mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5019 Update display model on separate intersection settings change
This commit is contained in:
@@ -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;
|
RimCellEdgeColors* cellEdgeColors = nullptr;
|
||||||
this->firstAncestorOrThisOfType( cellEdgeColors );
|
this->firstAncestorOrThisOfType( cellEdgeColors );
|
||||||
if ( cellEdgeColors )
|
if ( cellEdgeColors )
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
#include "RimGeoMechCase.h"
|
#include "RimGeoMechCase.h"
|
||||||
#include "RimGeoMechCellColors.h"
|
#include "RimGeoMechCellColors.h"
|
||||||
|
#include "RimGridView.h"
|
||||||
|
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||||
#include "RimRegularLegendConfig.h"
|
#include "RimRegularLegendConfig.h"
|
||||||
#include "RimTernaryLegendConfig.h"
|
#include "RimTernaryLegendConfig.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
@@ -78,7 +80,7 @@ RimIntersectionResultDefinition::~RimIntersectionResultDefinition() {}
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimIntersectionResultDefinition::isActive()
|
bool RimIntersectionResultDefinition::isActive() const
|
||||||
{
|
{
|
||||||
return m_isActive();
|
return m_isActive();
|
||||||
}
|
}
|
||||||
@@ -213,6 +215,17 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->updateConnectedEditors();
|
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 );
|
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();
|
||||||
~RimIntersectionResultDefinition() override;
|
~RimIntersectionResultDefinition() override;
|
||||||
|
|
||||||
bool isActive();
|
bool isActive() const;
|
||||||
|
bool isInAction() const;
|
||||||
QString autoName() const;
|
QString autoName() const;
|
||||||
RimCase* activeCase() const;
|
RimCase* activeCase() const;
|
||||||
bool isEclipseResultDefinition();
|
bool isEclipseResultDefinition();
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||||
|
|
||||||
#include "RimIntersectionResultDefinition.h"
|
#include "RimIntersectionResultDefinition.h"
|
||||||
|
#include "RimGridView.h"
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT( RimIntersectionResultsDefinitionCollection, "RimIntersectionResultsDefinitionCollection" );
|
CAF_PDM_SOURCE_INIT( RimIntersectionResultsDefinitionCollection, "RimIntersectionResultsDefinitionCollection" );
|
||||||
|
|
||||||
@@ -78,6 +79,10 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
|
|||||||
const QVariant& newValue )
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
this->updateUiIconFromToggleField();
|
this->updateUiIconFromToggleField();
|
||||||
|
|
||||||
|
RimGridView* gridView = nullptr;
|
||||||
|
this->firstAncestorOrThisOfType(gridView);
|
||||||
|
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user