mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
#5019 Update display model on separate intersection settings change
This commit is contained in:
parent
a181e0c11d
commit
31a698243d
@ -553,6 +553,15 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
RimIntersectionResultDefinition* sepIntersectionResDef = nullptr;
|
||||
this->firstAncestorOrThisOfType( sepIntersectionResDef );
|
||||
if (sepIntersectionResDef && sepIntersectionResDef->isInAction())
|
||||
{
|
||||
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
|
||||
RimGridView* eclView = dynamic_cast<RimGridView*>( view );
|
||||
if ( eclView ) eclView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
|
||||
RimCellEdgeColors* cellEdgeColors = nullptr;
|
||||
this->firstAncestorOrThisOfType( cellEdgeColors );
|
||||
if ( cellEdgeColors )
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -38,7 +38,8 @@ public:
|
||||
RimIntersectionResultDefinition();
|
||||
~RimIntersectionResultDefinition() override;
|
||||
|
||||
bool isActive();
|
||||
bool isActive() const;
|
||||
bool isInAction() const;
|
||||
QString autoName() const;
|
||||
RimCase* activeCase() const;
|
||||
bool isEclipseResultDefinition();
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
#include "RimGridView.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimIntersectionResultsDefinitionCollection, "RimIntersectionResultsDefinitionCollection" );
|
||||
|
||||
@ -78,6 +79,10 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
|
||||
const QVariant& newValue )
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType(gridView);
|
||||
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user