Source stepping and toolbar updates (#8866)

* Move layout options to separate toolbar
* Enable stepping on quantities, remove special history curve stepping for now
* Allow stepping ensembles and cases
* Add step next/prev and add new sub plot
This commit is contained in:
jonjenssen
2022-05-03 11:30:09 +02:00
committed by GitHub
parent ca9b209e9b
commit 3de8010c2b
24 changed files with 723 additions and 96 deletions

View File

@@ -197,6 +197,7 @@ void RiuPlotMainWindow::cleanupGuiBeforeProjectClose()
m_wellLogPlotToolBarEditor->clear();
m_multiPlotToolBarEditor->clear();
m_multiPlotLayoutToolBarEditor->clear();
setWindowTitle( "Plots - ResInsight" );
}
@@ -431,6 +432,9 @@ void RiuPlotMainWindow::createToolBars()
m_multiPlotToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Multi Plot", this );
m_multiPlotToolBarEditor->hide();
m_multiPlotLayoutToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Multi Plot Layout", this );
m_multiPlotLayoutToolBarEditor->hide();
if ( RiaPreferences::current()->useUndoRedo() )
{
QToolBar* toolbar = addToolBar( tr( "Edit" ) );
@@ -689,14 +693,29 @@ void RiuPlotMainWindow::updateMultiPlotToolBar()
{
std::vector<caf::PdmFieldHandle*> toolBarFields = plotWindow->fieldsToShowInToolbar();
m_multiPlotToolBarEditor->setFields( toolBarFields );
m_multiPlotToolBarEditor->updateUi();
m_multiPlotToolBarEditor->show();
if ( toolBarFields.empty() )
{
m_multiPlotToolBarEditor->clear();
m_multiPlotToolBarEditor->hide();
}
else
{
m_multiPlotToolBarEditor->setFields( toolBarFields );
m_multiPlotToolBarEditor->updateUi();
m_multiPlotToolBarEditor->show();
}
std::vector<caf::PdmFieldHandle*> layoutFields = plotWindow->fieldsToShowInLayoutToolbar();
m_multiPlotLayoutToolBarEditor->setFields( layoutFields );
m_multiPlotLayoutToolBarEditor->updateUi();
m_multiPlotLayoutToolBarEditor->show();
}
else
{
m_multiPlotToolBarEditor->clear();
m_multiPlotToolBarEditor->hide();
m_multiPlotLayoutToolBarEditor->clear();
m_multiPlotLayoutToolBarEditor->hide();
}
refreshToolbars();
}