Make sure toolbar is refreshed when a new plot is added (#9199)

This commit is contained in:
jonjenssen authored and Magne Sjaastad committed 2022-09-15 08:19:41 +02:00
1 parent 0dded5a252
commit 05e0817074
24 files changed
+27 -2

No files matched your search

@@ -98,6 +98,7 @@ void RicNewAnalysisPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot ); RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -176,6 +176,7 @@ RimStimPlanModelPlot* RicNewStimPlanModelPlotFeature::createPlot( RimStimPlanMod
} }
RiuPlotMainWindowTools::selectAsCurrentItem( plot ); RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::refreshToolbars();
// Make sure the summary plot window is visible // Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
@@ -102,6 +102,7 @@ void RicNewCorrelationMatrixPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot ); RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -97,6 +97,7 @@ void RicNewCorrelationPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot ); RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -103,6 +103,7 @@ void RicNewCorrelationReportPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot ); RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -107,6 +107,7 @@ void RicNewParameterResultCrossPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot ); RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -84,6 +84,7 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered( bool isCheck
RiuPlotMainWindowTools::selectAsCurrentItem( flowCharacteristicsPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( flowCharacteristicsPlot );
RiuPlotMainWindowTools::setExpanded( flowCharacteristicsPlot ); RiuPlotMainWindowTools::setExpanded( flowCharacteristicsPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
} }
@@ -83,6 +83,7 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::selectAsCurrentItem( wellAllocationPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( wellAllocationPlot );
RiuPlotMainWindowTools::setExpanded( wellAllocationPlot ); RiuPlotMainWindowTools::setExpanded( wellAllocationPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
} }
@@ -98,6 +98,7 @@ void RicShowFlowCharacteristicsPlotFeature::onActionTriggered( bool isChecked )
// Make sure the summary plot window is created and visible // Make sure the summary plot window is created and visible
RiuPlotMainWindowTools::selectAsCurrentItem( flowPlotColl->defaultFlowCharacteristicsPlot() ); RiuPlotMainWindowTools::selectAsCurrentItem( flowPlotColl->defaultFlowCharacteristicsPlot() );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
} }
@@ -114,6 +114,7 @@ void RicShowWellAllocationPlotFeature::onActionTriggered( bool isChecked )
// Make sure the summary plot window is created and visible // Make sure the summary plot window is created and visible
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( flowPlotColl->defaultWellAllocPlot() ); RiuPlotMainWindowTools::selectAsCurrentItem( flowPlotColl->defaultWellAllocPlot() );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
} }
@@ -83,6 +83,7 @@ void RicCreateGridCrossPlotFeature::onActionTriggered( bool isChecked )
collection->updateAllRequiredEditors(); collection->updateAllRequiredEditors();
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow(); RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( dataSet ); RiuPlotMainWindowTools::selectAsCurrentItem( dataSet );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -200,6 +200,7 @@ void RicCreateSaturationPressurePlotsFeature::onActionTriggered( bool isChecked
if ( objectToSelect ) if ( objectToSelect )
{ {
RiuPlotMainWindowTools::selectAsCurrentItem( objectToSelect ); RiuPlotMainWindowTools::selectAsCurrentItem( objectToSelect );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
@@ -60,6 +60,7 @@ void RicCreateEnsembleFractureStatisticsPlotFeature::onActionTriggered( bool isC
collection->updateAllRequiredEditors(); collection->updateAllRequiredEditors();
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow(); RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( plot ); RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -273,6 +273,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( wellLogPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( wellLogPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
} }
@@ -65,6 +65,7 @@ void RicCreateGridStatisticsPlotFeature::onActionTriggered( bool isChecked )
collection->updateAllRequiredEditors(); collection->updateAllRequiredEditors();
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow(); RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( plot ); RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -145,6 +145,7 @@ bool RicImportSummaryCasesFeature::createAndAddSummaryCasesFromFiles( const QStr
{ {
RiuPlotMainWindowTools::setExpanded( plotToSelect ); RiuPlotMainWindowTools::setExpanded( plotToSelect );
RiuPlotMainWindowTools::selectAsCurrentItem( plotToSelect ); RiuPlotMainWindowTools::selectAsCurrentItem( plotToSelect );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
@@ -98,6 +98,7 @@ void RicNewVfpPlotFeature::onActionTriggered( bool isChecked )
if ( !vfpPlots.empty() ) if ( !vfpPlots.empty() )
{ {
RiuPlotMainWindowTools::selectAsCurrentItem( vfpPlots.front() ); RiuPlotMainWindowTools::selectAsCurrentItem( vfpPlots.front() );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
} }
@@ -30,6 +30,7 @@
#include "RimSummaryCurve.h" #include "RimSummaryCurve.h"
#include "RiuPlotMainWindow.h" #include "RiuPlotMainWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" #include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
@@ -76,8 +77,7 @@ void RicNewSummaryCrossPlotCurveFeature::onActionTriggered( bool isChecked )
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve ); RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow(); RiuPlotMainWindowTools::refreshToolbars();
mainPlotWindow->updateMultiPlotToolBar();
} }
} }
@@ -90,6 +90,7 @@ void RicNewSummaryCrossPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( summaryPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( summaryPlot );
RiuPlotMainWindowTools::setExpanded( summaryPlot ); RiuPlotMainWindowTools::setExpanded( summaryPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
@@ -107,6 +107,7 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( plot ); RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::setExpanded( plotTrack ); RiuPlotMainWindowTools::setExpanded( plotTrack );
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -123,6 +123,7 @@ void RicNewPltPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::setExpanded( plotTrack ); RiuPlotMainWindowTools::setExpanded( plotTrack );
RiuPlotMainWindowTools::selectAsCurrentItem( pltPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( pltPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
@@ -87,6 +87,7 @@ void RicNewRftPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::setExpanded( plotTrack ); RiuPlotMainWindowTools::setExpanded( plotTrack );
RiuPlotMainWindowTools::selectAsCurrentItem( rftPlot ); RiuPlotMainWindowTools::selectAsCurrentItem( rftPlot );
RiuPlotMainWindowTools::refreshToolbars();
} }
} }
@@ -124,6 +124,7 @@ RimWellBoreStabilityPlot*
// Make sure the summary plot window is visible // Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow(); RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::refreshToolbars();
return plot; return plot;
} }
@@ -29,6 +29,8 @@
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
#include "RimWellLogTrack.h" #include "RimWellLogTrack.h"
#include "RiuPlotMainWindowTools.h"
#include "RicWellLogTools.h" #include "RicWellLogTools.h"
#include <QAction> #include <QAction>
@@ -57,6 +59,7 @@ void RicNewWellLogPlotFeature::onActionTriggered( bool isChecked )
RimWellLogPlot* plot = nullptr; RimWellLogPlot* plot = nullptr;
plotTrack->firstAncestorOrThisOfTypeAsserted( plot ); plotTrack->firstAncestorOrThisOfTypeAsserted( plot );
plot->zoomAll(); plot->zoomAll();
RiuPlotMainWindowTools::refreshToolbars();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------