diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp index ed5f0599ee..d799a8846a 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp @@ -96,8 +96,7 @@ RimGeoMechResultDefinition::RimGeoMechResultDefinition(void) m_resultVariableUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName()); m_resultVariableUiField.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP); - - + m_isChangedByField = false; } //-------------------------------------------------------------------------------------------------- @@ -124,6 +123,14 @@ void RimGeoMechResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm timeLapseGr->add(&m_timeLapseBaseTimestepUiField); } + if (!m_isChangedByField) + { + m_resultPositionTypeUiField = m_resultPositionType; + m_resultVariableUiField = composeFieldCompString(m_resultFieldName(), m_resultComponentName()); + } + + m_isChangedByField = false; + uiOrdering.skipRemainingFields(true); } @@ -190,6 +197,8 @@ void RimGeoMechResultDefinition::setGeoMechCase(RimGeoMechCase* geomCase) //-------------------------------------------------------------------------------------------------- void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { + m_isChangedByField = true; + if( &m_resultPositionTypeUiField == changedField || &m_isTimeLapseResultUiField == changedField || &m_timeLapseBaseTimestepUiField == changedField) diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h index 13f39eab9a..e8e2b3da5b 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h +++ b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h @@ -113,6 +113,7 @@ private: caf::PdmField m_isTimeLapseResultUiField; caf::PdmField m_timeLapseBaseTimestepUiField; - caf::PdmPointer m_geomCase; + + bool m_isChangedByField; };