From d281c7e02a1e7564c63b0a2ee19f105dea19a64a Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 18 Oct 2023 08:50:04 +0200 Subject: [PATCH] Show Plot Data: Add special handling for well log plots Well log plots do not derive from RimPlot, add special handling. --- .../RicShowPlotDataFeature.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp index 93156bd9d7a..9f789058240 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp @@ -233,6 +233,9 @@ void RicShowPlotDataFeature::onActionTriggered( bool isChecked ) // Using RiuTabbedGridCrossPlotTextProvider std::vector crossPlots; + // Special handling for well log plots + std::vector wellLogPlots; + // Show content using RimPlot::description() and RimPlot::asciiDataForPlotExport() std::vector rimPlots; @@ -250,6 +253,12 @@ void RicShowPlotDataFeature::onActionTriggered( bool isChecked ) continue; } + if ( auto wellLogPlot = dynamic_cast( plot ) ) + { + wellLogPlots.push_back( wellLogPlot ); + continue; + } + if ( auto correlationReportPlot = dynamic_cast( 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 ); + } } //--------------------------------------------------------------------------------------------------