mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Summary Multiplot: sync plot selection in tree with view (#8788)
* Make sure the subplot selected in the tree is shown in the multiplot viewer. * Clean up multiplot toolbar handling a bit * Remove old summary plot toolbar.
This commit is contained in:
1 parent
3590c52cdc
commit
d156160daf
27 files changed
+78
-228
No files matched your search
@@ -795,7 +795,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1076,7 +1076,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
plot->updatePlotTitle();
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
|
||||
// If no plot collection is found, we assume that we are inside a curve creator
|
||||
// Update the summary curve collection to make sure the curve names are updated in curve creator UI
|
||||
@@ -1236,7 +1236,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
|
||||
dataChanged.send();
|
||||
}
|
||||
|
||||
@@ -449,6 +449,9 @@ std::vector<caf::PdmFieldHandle*> RimSummaryMultiPlot::fieldsToShowInToolbar()
|
||||
toolBarFields.insert( std::end( toolBarFields ), std::begin( fields ), std::end( fields ) );
|
||||
}
|
||||
|
||||
auto multiFields = RimMultiPlot::fieldsToShowInToolbar();
|
||||
toolBarFields.insert( std::end( toolBarFields ), std::begin( multiFields ), std::end( multiFields ) );
|
||||
|
||||
return toolBarFields;
|
||||
}
|
||||
|
||||
@@ -580,6 +583,14 @@ void RimSummaryMultiPlot::duplicate()
|
||||
duplicatePlot.send( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::makeSureIsVisible( RimSummaryPlot* summaryPlot )
|
||||
{
|
||||
if ( summaryPlot->plotWidget() && !m_viewer.isNull() ) m_viewer->scrollToPlot( summaryPlot->plotWidget() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
void removePlotNoUpdate( RimPlot* plot ) override;
|
||||
void updateAfterPlotRemove() override;
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
||||
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar() override;
|
||||
|
||||
void syncAxisRanges();
|
||||
|
||||
@@ -79,6 +79,8 @@ public:
|
||||
std::vector<RimSummaryPlot*> summaryPlots() const;
|
||||
std::vector<RimSummaryPlot*> visibleSummaryPlots() const;
|
||||
|
||||
void makeSureIsVisible( RimSummaryPlot* plot );
|
||||
|
||||
protected:
|
||||
bool handleGlobalKeyEvent( QKeyEvent* keyEvent ) override;
|
||||
bool handleGlobalWheelEvent( QWheelEvent* wheelEvent ) override;
|
||||
|
||||
@@ -112,7 +112,7 @@ void RimSummaryPlotCollection::onChildDeleted( caf::PdmChildArrayFieldHandle*
|
||||
{
|
||||
updateSummaryNameHasChanged();
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@ void RimSummaryPlotFilterTextCurveSetEditor::fieldChangedByUi( const caf::PdmFie
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
if ( mainPlotWindow )
|
||||
{
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,9 +397,8 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
ensembleCurveColl->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
bool forceUpdateOfFieldsInToolbar = true;
|
||||
mainPlotWindow->updateSummaryPlotToolBar( forceUpdateOfFieldsInToolbar );
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -597,7 +596,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
}
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user