mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-13 17:02:13 -05:00
Merge branch 'dev' into measurement
This commit is contained in:
commit
5976298267
76 files changed
+15220
-474
No files matched your search
@@ -22,6 +22,7 @@
|
||||
#include "RiaBaseDefs.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimEnsembleCurveSetCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
@@ -43,6 +44,7 @@
|
||||
#include "cafPdmUiToolBarEditor.h"
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "cafQTreeViewStateSerializer.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include <QDockWidget>
|
||||
@@ -494,18 +496,39 @@ void RiuPlotMainWindow::updateWellLogPlotToolBar()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotMainWindow::updateSummaryPlotToolBar()
|
||||
void RiuPlotMainWindow::updateSummaryPlotToolBar(bool forceUpdateUi)
|
||||
{
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>(m_activePlotViewWindow.p());
|
||||
if (summaryPlot)
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
||||
toolBarFields = summaryPlot->summaryCurveCollection()->fieldsToShowInToolbar();
|
||||
|
||||
|
||||
RimEnsembleCurveSetCollection* ensembleCurveSetColl = nullptr;
|
||||
|
||||
caf::PdmObjectHandle* selectedObj =
|
||||
dynamic_cast<caf::PdmObjectHandle*>(caf::SelectionManager::instance()->selectedItem());
|
||||
if (selectedObj)
|
||||
{
|
||||
selectedObj->firstAncestorOrThisOfType(ensembleCurveSetColl);
|
||||
}
|
||||
|
||||
if (ensembleCurveSetColl)
|
||||
{
|
||||
toolBarFields = ensembleCurveSetColl->fieldsToShowInToolbar();
|
||||
}
|
||||
else
|
||||
{
|
||||
toolBarFields = summaryPlot->summaryCurveCollection()->fieldsToShowInToolbar();
|
||||
}
|
||||
|
||||
if (!m_summaryPlotToolBarEditor->isEditorDataValid(toolBarFields))
|
||||
{
|
||||
m_summaryPlotToolBarEditor->setFields(toolBarFields);
|
||||
}
|
||||
else if (forceUpdateUi)
|
||||
{
|
||||
m_summaryPlotToolBarEditor->updateUi();
|
||||
}
|
||||
|
||||
m_summaryPlotToolBarEditor->updateUi();
|
||||
|
||||
@@ -694,6 +717,16 @@ void RiuPlotMainWindow::selectedObjectsChanged()
|
||||
|
||||
m_pdmUiPropertyView->showProperties(firstSelectedObject);
|
||||
|
||||
if (firstSelectedObject)
|
||||
{
|
||||
RimSummaryPlot* summaryPlot = nullptr;
|
||||
firstSelectedObject->firstAncestorOrThisOfType(summaryPlot);
|
||||
if (summaryPlot)
|
||||
{
|
||||
updateSummaryPlotToolBar();
|
||||
}
|
||||
}
|
||||
|
||||
if (uiItems.size() == 1 && m_allowActiveViewChangeFromSelection)
|
||||
{
|
||||
// Find the reservoir view or the Plot that the selected item is within
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
void addToTemporaryWidgets(QWidget* widget);
|
||||
|
||||
void updateWellLogPlotToolBar();
|
||||
void updateSummaryPlotToolBar();
|
||||
void updateSummaryPlotToolBar(bool forceUpdateUi = false);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
Reference in new issue
Block a user