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

This commit is contained in:
jonjenssen
2022-08-17 08:11:30 +02:00
committed by GitHub
parent 535d87c9c4
commit 7607c19c7a
24 changed files with 27 additions and 2 deletions

View File

@@ -98,6 +98,7 @@ void RicNewAnalysisPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -176,6 +176,7 @@ RimStimPlanModelPlot* RicNewStimPlanModelPlotFeature::createPlot( RimStimPlanMod
}
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::refreshToolbars();
// Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow();

View File

@@ -102,6 +102,7 @@ void RicNewCorrelationMatrixPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -97,6 +97,7 @@ void RicNewCorrelationPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -103,6 +103,7 @@ void RicNewCorrelationReportPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -107,6 +107,7 @@ void RicNewParameterResultCrossPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -84,6 +84,7 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered( bool isCheck
RiuPlotMainWindowTools::selectAsCurrentItem( flowCharacteristicsPlot );
RiuPlotMainWindowTools::setExpanded( flowCharacteristicsPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}
}

View File

@@ -83,6 +83,7 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::selectAsCurrentItem( wellAllocationPlot );
RiuPlotMainWindowTools::setExpanded( wellAllocationPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}
}

View File

@@ -98,6 +98,7 @@ void RicShowFlowCharacteristicsPlotFeature::onActionTriggered( bool isChecked )
// Make sure the summary plot window is created and visible
RiuPlotMainWindowTools::selectAsCurrentItem( flowPlotColl->defaultFlowCharacteristicsPlot() );
RiuPlotMainWindowTools::refreshToolbars();
}
}
}

View File

@@ -114,6 +114,7 @@ void RicShowWellAllocationPlotFeature::onActionTriggered( bool isChecked )
// Make sure the summary plot window is created and visible
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( flowPlotColl->defaultWellAllocPlot() );
RiuPlotMainWindowTools::refreshToolbars();
}
}
}

View File

@@ -83,6 +83,7 @@ void RicCreateGridCrossPlotFeature::onActionTriggered( bool isChecked )
collection->updateAllRequiredEditors();
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( dataSet );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -200,6 +200,7 @@ void RicCreateSaturationPressurePlotsFeature::onActionTriggered( bool isChecked
if ( objectToSelect )
{
RiuPlotMainWindowTools::selectAsCurrentItem( objectToSelect );
RiuPlotMainWindowTools::refreshToolbars();
}
}

View File

@@ -60,6 +60,7 @@ void RicCreateEnsembleFractureStatisticsPlotFeature::onActionTriggered( bool isC
collection->updateAllRequiredEditors();
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -273,6 +273,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( wellLogPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}
}

View File

@@ -65,6 +65,7 @@ void RicCreateGridStatisticsPlotFeature::onActionTriggered( bool isChecked )
collection->updateAllRequiredEditors();
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -145,6 +145,7 @@ bool RicImportSummaryCasesFeature::createAndAddSummaryCasesFromFiles( const QStr
{
RiuPlotMainWindowTools::setExpanded( plotToSelect );
RiuPlotMainWindowTools::selectAsCurrentItem( plotToSelect );
RiuPlotMainWindowTools::refreshToolbars();
}
}

View File

@@ -98,6 +98,7 @@ void RicNewVfpPlotFeature::onActionTriggered( bool isChecked )
if ( !vfpPlots.empty() )
{
RiuPlotMainWindowTools::selectAsCurrentItem( vfpPlots.front() );
RiuPlotMainWindowTools::refreshToolbars();
}
}
}

View File

@@ -30,6 +30,7 @@
#include "RimSummaryCurve.h"
#include "RiuPlotMainWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
@@ -76,8 +77,7 @@ void RicNewSummaryCrossPlotCurveFeature::onActionTriggered( bool isChecked )
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
mainPlotWindow->updateMultiPlotToolBar();
RiuPlotMainWindowTools::refreshToolbars();
}
}

View File

@@ -90,6 +90,7 @@ void RicNewSummaryCrossPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( summaryPlot );
RiuPlotMainWindowTools::setExpanded( summaryPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}

View File

@@ -107,6 +107,7 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
RiuPlotMainWindowTools::setExpanded( plotTrack );
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -123,6 +123,7 @@ void RicNewPltPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::setExpanded( plotTrack );
RiuPlotMainWindowTools::selectAsCurrentItem( pltPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}

View File

@@ -87,6 +87,7 @@ void RicNewRftPlotFeature::onActionTriggered( bool isChecked )
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::setExpanded( plotTrack );
RiuPlotMainWindowTools::selectAsCurrentItem( rftPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}

View File

@@ -124,6 +124,7 @@ RimWellBoreStabilityPlot*
// Make sure the summary plot window is visible
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::refreshToolbars();
return plot;
}

View File

@@ -29,6 +29,8 @@
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RiuPlotMainWindowTools.h"
#include "RicWellLogTools.h"
#include <QAction>
@@ -57,6 +59,7 @@ void RicNewWellLogPlotFeature::onActionTriggered( bool isChecked )
RimWellLogPlot* plot = nullptr;
plotTrack->firstAncestorOrThisOfTypeAsserted( plot );
plot->zoomAll();
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------