mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved handling of icon enabled state
This commit is contained in:
parent
c579c61404
commit
0550f9df8c
@ -82,7 +82,7 @@ void Rim3dOverlayInfoConfig::setPosition(cvf::Vec2ui position)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dOverlayInfoConfig::update3DInfo()
|
||||
{
|
||||
this->updateUiIconFromState(active);
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if (!m_reservoirView) return;
|
||||
if (!m_reservoirView->viewer()) return;
|
||||
|
@ -76,7 +76,7 @@ RimReservoirView* RimCellPropertyFilterCollection::reservoirView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellPropertyFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
this->updateUiIconFromState(active);
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
m_reservoirView->fieldChangedByUi(&(m_reservoirView->propertyFilterCollection), oldValue, newValue);
|
||||
}
|
||||
@ -131,6 +131,8 @@ void RimCellPropertyFilterCollection::loadAndInitializePropertyFilters()
|
||||
void RimCellPropertyFilterCollection::initAfterRead()
|
||||
{
|
||||
loadAndInitializePropertyFilters();
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -138,7 +138,7 @@ RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
updateUiIconFromState(isActive);
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
CVF_ASSERT(m_reservoirView);
|
||||
|
||||
@ -184,8 +184,9 @@ void RimCellRangeFilterCollection::initAfterRead()
|
||||
RimCellRangeFilter* rangeFilter = *it;
|
||||
rangeFilter->setParentContainer(this);
|
||||
rangeFilter->updateIconState();
|
||||
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -63,10 +63,7 @@ caf::PdmFieldHandle* RimFault::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFault::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (&showFault == changedField)
|
||||
{
|
||||
this->updateUiIconFromState(showFault);
|
||||
}
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if (&faultColor == changedField || &showFault == changedField)
|
||||
{
|
||||
|
@ -86,11 +86,8 @@ RimFaultCollection::~RimFaultCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (&showFaultCollection == changedField)
|
||||
{
|
||||
this->updateUiIconFromState(showFaultCollection);
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if (&faultLabelColor == changedField)
|
||||
{
|
||||
m_reservoirView->scheduleReservoirGridGeometryRegen();
|
||||
|
@ -84,7 +84,7 @@ void RimFaultResultSettings::setReservoirView(RimReservoirView* ownerReservoirVi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultResultSettings::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
this->updateUiIconFromState(showCustomFaultResult);
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
m_customFaultResult->fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
||||
@ -111,7 +111,7 @@ void RimFaultResultSettings::initAfterRead()
|
||||
m_customFaultResult->initAfterRead();
|
||||
updateFieldVisibility();
|
||||
|
||||
this->updateUiIconFromState(showCustomFaultResult);
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -415,7 +415,7 @@ void RimReservoirView::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
}
|
||||
}
|
||||
|
||||
this->updateUiIconFromState(showWindow);
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
else if (changedField == &backgroundColor )
|
||||
{
|
||||
@ -974,6 +974,8 @@ void RimReservoirView::initAfterRead()
|
||||
this->cellEdgeResult()->setReservoirView(this);
|
||||
this->rangeFilterCollection()->setReservoirView(this);
|
||||
this->propertyFilterCollection()->setReservoirView(this);
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -293,6 +293,8 @@ void RimResultDefinition::initAfterRead()
|
||||
m_porosityModelUiField = m_porosityModel;
|
||||
m_resultTypeUiField = m_resultType;
|
||||
m_resultVariableUiField = m_resultVariable;
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -190,7 +190,7 @@ void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
{
|
||||
if (&showWellLabel == changedField || &isActive == changedField)
|
||||
{
|
||||
this->updateUiIconFromState(isActive);
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if (m_reservoirView)
|
||||
{
|
||||
|
@ -89,6 +89,8 @@ void RimOilFieldEntry::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
void RimOilFieldEntry::initAfterRead()
|
||||
{
|
||||
updateEnabledState();
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user