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:
@@ -82,7 +82,7 @@ void Rim3dOverlayInfoConfig::setPosition(cvf::Vec2ui position)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim3dOverlayInfoConfig::update3DInfo()
|
void Rim3dOverlayInfoConfig::update3DInfo()
|
||||||
{
|
{
|
||||||
this->updateUiIconFromState(active);
|
this->updateUiIconFromToggleField();
|
||||||
|
|
||||||
if (!m_reservoirView) return;
|
if (!m_reservoirView) return;
|
||||||
if (!m_reservoirView->viewer()) 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)
|
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);
|
m_reservoirView->fieldChangedByUi(&(m_reservoirView->propertyFilterCollection), oldValue, newValue);
|
||||||
}
|
}
|
||||||
@@ -131,6 +131,8 @@ void RimCellPropertyFilterCollection::loadAndInitializePropertyFilters()
|
|||||||
void RimCellPropertyFilterCollection::initAfterRead()
|
void RimCellPropertyFilterCollection::initAfterRead()
|
||||||
{
|
{
|
||||||
loadAndInitializePropertyFilters();
|
loadAndInitializePropertyFilters();
|
||||||
|
|
||||||
|
this->updateUiIconFromToggleField();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
updateUiIconFromState(isActive);
|
this->updateUiIconFromToggleField();
|
||||||
|
|
||||||
CVF_ASSERT(m_reservoirView);
|
CVF_ASSERT(m_reservoirView);
|
||||||
|
|
||||||
@@ -184,8 +184,9 @@ void RimCellRangeFilterCollection::initAfterRead()
|
|||||||
RimCellRangeFilter* rangeFilter = *it;
|
RimCellRangeFilter* rangeFilter = *it;
|
||||||
rangeFilter->setParentContainer(this);
|
rangeFilter->setParentContainer(this);
|
||||||
rangeFilter->updateIconState();
|
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)
|
void RimFault::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
if (&showFault == changedField)
|
this->updateUiIconFromToggleField();
|
||||||
{
|
|
||||||
this->updateUiIconFromState(showFault);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (&faultColor == changedField || &showFault == changedField)
|
if (&faultColor == changedField || &showFault == changedField)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,11 +86,8 @@ RimFaultCollection::~RimFaultCollection()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimFaultCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimFaultCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
if (&showFaultCollection == changedField)
|
this->updateUiIconFromToggleField();
|
||||||
{
|
|
||||||
this->updateUiIconFromState(showFaultCollection);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (&faultLabelColor == changedField)
|
if (&faultLabelColor == changedField)
|
||||||
{
|
{
|
||||||
m_reservoirView->scheduleReservoirGridGeometryRegen();
|
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)
|
void RimFaultResultSettings::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
this->updateUiIconFromState(showCustomFaultResult);
|
this->updateUiIconFromToggleField();
|
||||||
|
|
||||||
m_customFaultResult->fieldChangedByUi(changedField, oldValue, newValue);
|
m_customFaultResult->fieldChangedByUi(changedField, oldValue, newValue);
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ void RimFaultResultSettings::initAfterRead()
|
|||||||
m_customFaultResult->initAfterRead();
|
m_customFaultResult->initAfterRead();
|
||||||
updateFieldVisibility();
|
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 )
|
else if (changedField == &backgroundColor )
|
||||||
{
|
{
|
||||||
@@ -974,6 +974,8 @@ void RimReservoirView::initAfterRead()
|
|||||||
this->cellEdgeResult()->setReservoirView(this);
|
this->cellEdgeResult()->setReservoirView(this);
|
||||||
this->rangeFilterCollection()->setReservoirView(this);
|
this->rangeFilterCollection()->setReservoirView(this);
|
||||||
this->propertyFilterCollection()->setReservoirView(this);
|
this->propertyFilterCollection()->setReservoirView(this);
|
||||||
|
|
||||||
|
this->updateUiIconFromToggleField();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -293,6 +293,8 @@ void RimResultDefinition::initAfterRead()
|
|||||||
m_porosityModelUiField = m_porosityModel;
|
m_porosityModelUiField = m_porosityModel;
|
||||||
m_resultTypeUiField = m_resultType;
|
m_resultTypeUiField = m_resultType;
|
||||||
m_resultVariableUiField = m_resultVariable;
|
m_resultVariableUiField = m_resultVariable;
|
||||||
|
|
||||||
|
this->updateUiIconFromToggleField();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
|||||||
{
|
{
|
||||||
if (&showWellLabel == changedField || &isActive == changedField)
|
if (&showWellLabel == changedField || &isActive == changedField)
|
||||||
{
|
{
|
||||||
this->updateUiIconFromState(isActive);
|
this->updateUiIconFromToggleField();
|
||||||
|
|
||||||
if (m_reservoirView)
|
if (m_reservoirView)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ void RimOilFieldEntry::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
void RimOilFieldEntry::initAfterRead()
|
void RimOilFieldEntry::initAfterRead()
|
||||||
{
|
{
|
||||||
updateEnabledState();
|
updateEnabledState();
|
||||||
|
|
||||||
|
this->updateUiIconFromToggleField();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user