mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#2465 Property panel: Update UI fields from selected result on tree view object changed
This commit is contained in:
parent
2e8a497989
commit
4eb80e83bb
@ -497,6 +497,14 @@ void RimCellEdgeColors::posNegClosestToZero(double& pos, double& neg)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellEdgeColors::updateUiFieldsFromActiveResult()
|
||||
{
|
||||
m_singleVarEdgeResultColors->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -91,6 +91,9 @@ public:
|
||||
|
||||
void minMaxCellEdgeValues(double& min, double& max);
|
||||
void posNegClosestToZero(double& pos, double& neg);
|
||||
|
||||
void updateUiFieldsFromActiveResult();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void initAfterRead();
|
||||
|
@ -97,6 +97,14 @@ RimEclipseCellColors* RimEclipseFaultColors::customFaultResult()
|
||||
return this->m_customFaultResultColors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseFaultColors::updateUiFieldsFromActiveResult()
|
||||
{
|
||||
m_customFaultResultColors->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
bool hasValidCustomResult();
|
||||
RimEclipseCellColors* customFaultResult();
|
||||
|
||||
void updateUiFieldsFromActiveResult();
|
||||
|
||||
protected:
|
||||
virtual void initAfterRead();
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
@ -548,3 +548,11 @@ void RimEclipsePropertyFilter::initAfterRead()
|
||||
resultDefinition->setEclipseCase(parentContainer()->reservoirView()->eclipseCase());
|
||||
updateIconState();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilter::updateUiFieldsFromActiveResult()
|
||||
{
|
||||
resultDefinition->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
|
@ -49,8 +49,10 @@ public:
|
||||
void computeResultValueRange();
|
||||
void updateFromCurrentTimeStep();
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual void initAfterRead();
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void initAfterRead() override;
|
||||
|
||||
void updateUiFieldsFromActiveResult();
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
@ -1060,6 +1060,15 @@ void RimEclipseResultDefinition::setSelectedSouringTracers(const std::vector<QSt
|
||||
this->m_selectedSouringTracersUiField = selectedTracers;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinition::updateUiFieldsFromActiveResult()
|
||||
{
|
||||
m_resultTypeUiField = m_resultType;
|
||||
m_resultVariableUiField = resultVariable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -99,6 +99,7 @@ public:
|
||||
void setSelectedTracers(const std::vector<QString>& selectedTracers);
|
||||
void setSelectedSouringTracers(const std::vector<QString>& selectedTracers);
|
||||
|
||||
void updateUiFieldsFromActiveResult();
|
||||
|
||||
protected:
|
||||
virtual void updateLegendCategorySettings() {};
|
||||
|
@ -25,15 +25,19 @@
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaRegressionTest.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimCommandObject.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "Rim3dView.h"
|
||||
|
||||
#include "RiuDragDrop.h"
|
||||
#include "RiuMdiSubWindow.h"
|
||||
@ -41,13 +45,13 @@
|
||||
#include "RiuProcessMonitor.h"
|
||||
#include "RiuProjectPropertyView.h"
|
||||
#include "RiuPropertyViewTabWidget.h"
|
||||
#include "RiuPvtPlotPanel.h"
|
||||
#include "RiuRelativePermeabilityPlotPanel.h"
|
||||
#include "RiuResultInfoPanel.h"
|
||||
#include "RiuResultQwtPlot.h"
|
||||
#include "RiuToolTipMenu.h"
|
||||
#include "RiuTreeViewEventFilter.h"
|
||||
#include "RiuViewer.h"
|
||||
#include "RiuRelativePermeabilityPlotPanel.h"
|
||||
#include "RiuPvtPlotPanel.h"
|
||||
|
||||
#include "cafAnimationToolBar.h"
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
@ -1257,6 +1261,9 @@ void RiuMainWindow::selectedObjectsChanged()
|
||||
{
|
||||
firstSelectedObject = dynamic_cast<caf::PdmObjectHandle*>(uiItems[0]);
|
||||
}
|
||||
|
||||
updateUiFieldsFromActiveResult(firstSelectedObject);
|
||||
|
||||
m_pdmUiPropertyView->showProperties(firstSelectedObject);
|
||||
|
||||
if (uiItems.size() == 1)
|
||||
@ -1539,6 +1546,40 @@ void RiuMainWindow::showDockPanel(const QString &dockPanelName)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::updateUiFieldsFromActiveResult(caf::PdmObjectHandle* objectToUpdate)
|
||||
{
|
||||
RimEclipseResultDefinition* resultDefinition = nullptr;
|
||||
resultDefinition = dynamic_cast<RimEclipseResultDefinition*>(objectToUpdate);
|
||||
if (resultDefinition)
|
||||
{
|
||||
resultDefinition->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
|
||||
RimEclipsePropertyFilter* eclPropFilter = nullptr;
|
||||
eclPropFilter = dynamic_cast<RimEclipsePropertyFilter*>(objectToUpdate);
|
||||
if (eclPropFilter)
|
||||
{
|
||||
eclPropFilter->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
|
||||
RimEclipseFaultColors* eclFaultColors = nullptr;
|
||||
eclFaultColors = dynamic_cast<RimEclipseFaultColors*>(objectToUpdate);
|
||||
if (eclFaultColors)
|
||||
{
|
||||
eclFaultColors->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
|
||||
RimCellEdgeColors* cellEdgeColors = nullptr;
|
||||
cellEdgeColors = dynamic_cast<RimCellEdgeColors*>(objectToUpdate);
|
||||
if (cellEdgeColors)
|
||||
{
|
||||
cellEdgeColors->updateUiFieldsFromActiveResult();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RiuMainWindowBase.h"
|
||||
|
||||
#include "cafPdmUiDragDropInterface.h"
|
||||
#include "cafPdmObjectHandle.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QPointer>
|
||||
@ -133,6 +134,8 @@ private:
|
||||
|
||||
void showDockPanel(const QString& dockPanelName);
|
||||
|
||||
void updateUiFieldsFromActiveResult(caf::PdmObjectHandle* objectToUpdate);
|
||||
|
||||
private:
|
||||
static RiuMainWindow* sm_mainWindowInstance;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user