mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Alligned the GeoMechResultDefinition to the EclipseResultDefinition way of updating the PropertyFilter
This commit is contained in:
parent
df0b4164c5
commit
b35e37bde2
@ -43,7 +43,6 @@ RimGeoMechPropertyFilter::RimGeoMechPropertyFilter()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&resultDefinition, "ResultDefinition", "Result definition", "", "", "");
|
||||
resultDefinition = new RimGeoMechResultDefinition();
|
||||
resultDefinition->setOwnerPropertyFilter(this);
|
||||
|
||||
// Set to hidden to avoid this item to been displayed as a child item
|
||||
// Fields in this object are displayed using defineUiOrdering()
|
||||
|
@ -165,6 +165,9 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
|
||||
}
|
||||
|
||||
// Get the possible property filter owner
|
||||
RimGeoMechPropertyFilter* propFilter = dynamic_cast<RimGeoMechPropertyFilter*>(this->parentField()->ownerObject());
|
||||
|
||||
if (&m_resultVariableUiField == changedField)
|
||||
{
|
||||
QStringList fieldComponentNames = m_resultVariableUiField().split(QRegExp("\\s+"));
|
||||
@ -186,9 +189,9 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
m_reservoirView->hasUserRequestedAnimation = true;
|
||||
}
|
||||
|
||||
if (m_propertyFilter)
|
||||
if (propFilter)
|
||||
{
|
||||
m_propertyFilter->setToDefaultValues();
|
||||
propFilter->setToDefaultValues();
|
||||
|
||||
((RimView*)reservoirView())->scheduleGeometryRegen(PROPERTY_FILTERED);
|
||||
}
|
||||
@ -196,10 +199,10 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_propertyFilter)
|
||||
|
||||
if (propFilter)
|
||||
{
|
||||
m_propertyFilter->updateConnectedEditors();
|
||||
propFilter->updateConnectedEditors();
|
||||
}
|
||||
|
||||
}
|
||||
@ -326,13 +329,6 @@ QString RimGeoMechResultDefinition::convertToUiResultFieldName(QString resultFie
|
||||
return resultFieldName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechResultDefinition::setOwnerPropertyFilter( RimGeoMechPropertyFilter* propertyFilter )
|
||||
{
|
||||
m_propertyFilter = propertyFilter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
@ -57,8 +57,6 @@ public:
|
||||
QString resultComponentName() { return m_resultComponentName();}
|
||||
void setResultAddress(const RigFemResultAddress& resultAddress);
|
||||
|
||||
void setOwnerPropertyFilter(RimGeoMechPropertyFilter* propertyFilter);
|
||||
|
||||
QString resultFieldUiName();
|
||||
QString resultComponentUiName();
|
||||
|
||||
@ -85,7 +83,6 @@ private:
|
||||
caf::PdmField<QString> m_resultVariableUiField;
|
||||
|
||||
caf::PdmPointer<RimGeoMechView> m_reservoirView;
|
||||
caf::PdmPointer<RimGeoMechPropertyFilter> m_propertyFilter;
|
||||
|
||||
static QString convertToUiResultFieldName(QString resultFieldName);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user