mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Show Plot Data: Add special handling for well log plots
Well log plots do not derive from RimPlot, add special handling.
This commit is contained in:
@@ -233,6 +233,9 @@ void RicShowPlotDataFeature::onActionTriggered( bool isChecked )
|
||||
// Using RiuTabbedGridCrossPlotTextProvider
|
||||
std::vector<RimGridCrossPlot*> crossPlots;
|
||||
|
||||
// Special handling for well log plots
|
||||
std::vector<RimWellLogPlot*> wellLogPlots;
|
||||
|
||||
// Show content using RimPlot::description() and RimPlot::asciiDataForPlotExport()
|
||||
std::vector<RimPlot*> rimPlots;
|
||||
|
||||
@@ -250,6 +253,12 @@ void RicShowPlotDataFeature::onActionTriggered( bool isChecked )
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( auto wellLogPlot = dynamic_cast<RimWellLogPlot*>( plot ) )
|
||||
{
|
||||
wellLogPlots.push_back( wellLogPlot );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( auto correlationReportPlot = dynamic_cast<RimCorrelationReportPlot*>( plot ) )
|
||||
{
|
||||
// A correlation report plot contains three plots. Add them as individual plots to rimPlots to make the data available in three
|
||||
@@ -288,6 +297,17 @@ void RicShowPlotDataFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RicShowPlotDataFeature::showTextWindow( title, text );
|
||||
}
|
||||
|
||||
for ( auto wellLogPlot : wellLogPlots )
|
||||
{
|
||||
QString title = wellLogPlot->description();
|
||||
QString text = title;
|
||||
text += "\n";
|
||||
text += "\n";
|
||||
text += wellLogPlot->asciiDataForPlotExport();
|
||||
|
||||
RicShowPlotDataFeature::showTextWindow( title, text );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -896,17 +896,17 @@ void RimDepthTrackPlot::setAvailableDepthTypes( const std::set<DepthTypeEnum>& d
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimDepthTrackPlot::asciiDataForPlotExport() const
|
||||
{
|
||||
QString out = description() + "\n";
|
||||
QString plotContentAsText;
|
||||
|
||||
for ( RimPlot* plot : plots() )
|
||||
{
|
||||
if ( plot->showWindow() )
|
||||
{
|
||||
out += plot->asciiDataForPlotExport();
|
||||
plotContentAsText += plot->asciiDataForPlotExport();
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
return plotContentAsText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user