Skip to content

Commit

Permalink
Show Plot Data: Add special handling for well log plots
Browse files Browse the repository at this point in the history
Well log plots do not derive from RimPlot, add special handling.
  • Loading branch information
magnesj committed Oct 18, 2023
1 parent ccc26aa commit d281c7e
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down Expand Up @@ -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 );
}
}

//--------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit d281c7e

Please sign in to comment.