#5019 Update display model on separate intersection settings change

This commit is contained in:
Jacob Støren
2019-11-21 08:28:00 +01:00
parent a181e0c11d
commit 31a698243d
4 changed files with 41 additions and 2 deletions

View File

@@ -23,6 +23,8 @@
#include "RimEclipseCellColors.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechCellColors.h"
#include "RimGridView.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "RimRegularLegendConfig.h"
#include "RimTernaryLegendConfig.h"
#include "RimTools.h"
@@ -78,7 +80,7 @@ RimIntersectionResultDefinition::~RimIntersectionResultDefinition() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIntersectionResultDefinition::isActive()
bool RimIntersectionResultDefinition::isActive() const
{
return m_isActive();
}
@@ -213,6 +215,17 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
}
this->updateConnectedEditors();
RimIntersectionResultsDefinitionCollection* interResDefColl = nullptr;
this->firstAncestorOrThisOfType( interResDefColl );
bool isInAction = isActive() && interResDefColl && interResDefColl->isActive();
if ( changedField == &m_isActive || ( changedField == &m_timeStep && isInAction ) )
{
RimGridView* gridView = nullptr;
this->firstAncestorOrThisOfType( gridView );
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
@@ -310,3 +323,14 @@ void RimIntersectionResultDefinition::initAfterRead()
m_geomResultDefinition->setGeoMechCase( geomCase );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIntersectionResultDefinition::isInAction() const
{
RimIntersectionResultsDefinitionCollection* interResDefColl = nullptr;
this->firstAncestorOrThisOfType( interResDefColl );
return isActive() && interResDefColl && interResDefColl->isActive();
}