Recalculate completions when completion collections are toggled

This commit is contained in:
Bjørnar Grip Fjær
2017-06-20 17:22:14 +02:00
parent 18b26aaf3a
commit 7d5157b3b3
4 changed files with 25 additions and 4 deletions

View File

@@ -81,7 +81,14 @@ void RimFishbonesCollection::fieldChangedByUi(const caf::PdmFieldHandle* changed
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);
proj->createDisplayModelAndRedrawAllViews();
if (changedField == &m_isChecked)
{
proj->reloadCompletionTypeResultsInAllViews();
}
else
{
proj->createDisplayModelAndRedrawAllViews();
}
}
//--------------------------------------------------------------------------------------------------

View File

@@ -62,7 +62,14 @@ void RimPerforationCollection::fieldChangedByUi(const caf::PdmFieldHandle* chang
{
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);
proj->createDisplayModelAndRedrawAllViews();
if (changedField == &m_isChecked)
{
proj->reloadCompletionTypeResultsInAllViews();
}
else
{
proj->createDisplayModelAndRedrawAllViews();
}
}
//--------------------------------------------------------------------------------------------------

View File

@@ -64,5 +64,12 @@ void RimWellPathFractureCollection::fieldChangedByUi(const caf::PdmFieldHandle*
{
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);
proj->createDisplayModelAndRedrawAllViews();
if (changedField == &m_isChecked)
{
proj->reloadCompletionTypeResultsInAllViews();
}
else
{
proj->createDisplayModelAndRedrawAllViews();
}
}

View File

@@ -37,7 +37,7 @@ public:
protected:
virtual caf::PdmFieldHandle* objectToggleField() override;
private:
protected:
caf::PdmField<bool> m_isChecked;
};