mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-11 07:56:08 -06:00
#588 GeoMech Color result: Make active result visible in property editor when selecting a object ofType/containing Result definition
This commit is contained in:
parent
b8c9989d0b
commit
b49396b88c
@ -94,8 +94,7 @@ RimGeoMechResultDefinition::RimGeoMechResultDefinition(void)
|
||||
m_resultVariableUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());
|
||||
m_resultVariableUiField.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
|
||||
|
||||
|
||||
|
||||
m_isChangedByField = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -122,6 +121,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);
|
||||
}
|
||||
|
||||
@ -187,6 +194,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)
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
caf::PdmField<bool> m_isTimeLapseResultUiField;
|
||||
caf::PdmField<int> m_timeLapseBaseTimestepUiField;
|
||||
|
||||
|
||||
caf::PdmPointer<RimGeoMechCase> m_geomCase;
|
||||
|
||||
bool m_isChangedByField;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user