mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2170 Summary Cross Plot : Improve update and visibility of UI when stepping
This commit is contained in:
@@ -416,6 +416,34 @@ void RiuMainPlotWindow::addToTemporaryWidgets(QWidget* widget)
|
||||
m_temporaryWidgets.push_back(widget);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainPlotWindow::updateSummaryPlotToolBar()
|
||||
{
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>(m_activePlotViewWindow);
|
||||
if (summaryPlot)
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
||||
toolBarFields = summaryPlot->summaryCurveCollection()->fieldsToShowInToolbar();
|
||||
|
||||
if (!m_summaryPlotToolBarEditor->isEditorDataValid(toolBarFields))
|
||||
{
|
||||
m_summaryPlotToolBarEditor->setFields(toolBarFields);
|
||||
m_summaryPlotToolBarEditor->updateUi();
|
||||
}
|
||||
|
||||
m_summaryPlotToolBarEditor->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_summaryPlotToolBarEditor->clear();
|
||||
|
||||
m_summaryPlotToolBarEditor->hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -527,23 +555,7 @@ void RiuMainPlotWindow::slotSubWindowActivated(QMdiSubWindow* subWindow)
|
||||
m_activePlotViewWindow = viewWindow;
|
||||
}
|
||||
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>(viewWindow);
|
||||
if (summaryPlot)
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
||||
toolBarFields = summaryPlot->summaryCurveCollection()->fieldsToShowInToolbar();
|
||||
|
||||
m_summaryPlotToolBarEditor->setFields(toolBarFields);
|
||||
m_summaryPlotToolBarEditor->updateUi();
|
||||
|
||||
m_summaryPlotToolBarEditor->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_summaryPlotToolBarEditor->clear();
|
||||
|
||||
m_summaryPlotToolBarEditor->hide();
|
||||
}
|
||||
updateSummaryPlotToolBar();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -83,6 +83,8 @@ public:
|
||||
|
||||
void addToTemporaryWidgets(QWidget* widget);
|
||||
|
||||
void updateSummaryPlotToolBar();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent* event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user