mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Simplified property filters and removed m_parentContainer
This commit is contained in:
@@ -51,7 +51,6 @@ CAF_PDM_SOURCE_INIT(RimEclipsePropertyFilter, "CellPropertyFilter");
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipsePropertyFilter::RimEclipsePropertyFilter()
|
||||
: m_parentContainer(NULL)
|
||||
{
|
||||
CAF_PDM_InitObject("Cell Property Filter", ":/CellFilter_Values.png", "", "");
|
||||
|
||||
@@ -101,7 +100,7 @@ void RimEclipsePropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
|| &isActive == changedField
|
||||
|| &filterMode == changedField)
|
||||
{
|
||||
m_parentContainer->fieldChangedByUi(changedField, oldValue, newValue);
|
||||
parentContainer()->fieldChangedByUi(changedField, oldValue, newValue);
|
||||
updateFilterName();
|
||||
this->updateIconState();
|
||||
}
|
||||
@@ -136,20 +135,12 @@ QList<caf::PdmOptionItemInfo> RimEclipsePropertyFilter::calculateValueOptions(co
|
||||
return optionItems;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilter::setParentContainer(RimEclipsePropertyFilterCollection* parentContainer)
|
||||
{
|
||||
m_parentContainer = parentContainer;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipsePropertyFilterCollection* RimEclipsePropertyFilter::parentContainer()
|
||||
{
|
||||
return m_parentContainer;
|
||||
return dynamic_cast<RimEclipsePropertyFilterCollection*>(this->parentField()->ownerObject());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -157,7 +148,7 @@ RimEclipsePropertyFilterCollection* RimEclipsePropertyFilter::parentContainer()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilter::setToDefaultValues()
|
||||
{
|
||||
CVF_ASSERT(m_parentContainer);
|
||||
CVF_ASSERT(parentContainer());
|
||||
|
||||
computeResultValueRange();
|
||||
|
||||
@@ -217,7 +208,7 @@ void RimEclipsePropertyFilter::defineEditorAttribute(const caf::PdmFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilter::computeResultValueRange()
|
||||
{
|
||||
CVF_ASSERT(m_parentContainer);
|
||||
CVF_ASSERT(parentContainer());
|
||||
|
||||
double min = 0.0;
|
||||
double max = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user