mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3309 Toolbar buttons for well log plot data source and make sure only visible curves and zonation/attributes affect the data source.
* This also required adding some updateConnectedEditors for updating the selected property views when changing the toolbar.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimViewWindow.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellLogCurveCommonDataSource.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "RiuDragDrop.h"
|
||||
@@ -114,6 +115,7 @@ void RiuPlotMainWindow::cleanupGuiBeforeProjectClose()
|
||||
|
||||
cleanUpTemporaryWidgets();
|
||||
|
||||
m_wellLogPlotToolBarEditor->clear();
|
||||
m_summaryPlotToolBarEditor->clear();
|
||||
|
||||
setWindowTitle("Plots - ResInsight");
|
||||
@@ -317,6 +319,9 @@ void RiuPlotMainWindow::createToolBars()
|
||||
}
|
||||
}
|
||||
|
||||
m_wellLogPlotToolBarEditor = new caf::PdmUiToolBarEditor("Well Log Plot", this);
|
||||
m_wellLogPlotToolBarEditor->hide();
|
||||
|
||||
m_summaryPlotToolBarEditor = new caf::PdmUiToolBarEditor("Summary Plot", this);
|
||||
m_summaryPlotToolBarEditor->hide();
|
||||
}
|
||||
@@ -461,6 +466,32 @@ void RiuPlotMainWindow::addToTemporaryWidgets(QWidget* widget)
|
||||
m_temporaryWidgets.push_back(widget);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotMainWindow::updateWellLogPlotToolBar()
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot = dynamic_cast<RimWellLogPlot*>(m_activePlotViewWindow.p());
|
||||
if (wellLogPlot)
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
||||
toolBarFields = wellLogPlot->commonDataSource()->fieldsToShowInToolbar();
|
||||
|
||||
m_wellLogPlotToolBarEditor->setFields(toolBarFields);
|
||||
m_wellLogPlotToolBarEditor->updateUi();
|
||||
|
||||
m_wellLogPlotToolBarEditor->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_wellLogPlotToolBarEditor->clear();
|
||||
|
||||
m_wellLogPlotToolBarEditor->hide();
|
||||
}
|
||||
|
||||
refreshToolbars();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -603,6 +634,7 @@ void RiuPlotMainWindow::slotSubWindowActivated(QMdiSubWindow* subWindow)
|
||||
m_activePlotViewWindow = viewWindow;
|
||||
}
|
||||
|
||||
updateWellLogPlotToolBar();
|
||||
updateSummaryPlotToolBar();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user