mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5019 Update 2dIntersection views when toggling sparate intersection results
This commit is contained in:
parent
9bfe51b205
commit
eed9f6abad
@ -18,12 +18,14 @@
|
||||
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechCellColors.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
@ -273,6 +275,27 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
update2dIntersectionViews();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionResultDefinition::update2dIntersectionViews()
|
||||
{
|
||||
// Update 2D Intersection views
|
||||
|
||||
std::vector<RimIntersection*> intersections;
|
||||
this->objectsWithReferringPtrFieldsOfType( intersections );
|
||||
|
||||
for ( auto intersection : intersections )
|
||||
{
|
||||
if ( intersection && intersection->correspondingIntersectionView() )
|
||||
{
|
||||
intersection->correspondingIntersectionView()->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,8 @@ protected:
|
||||
virtual void initAfterRead() override;
|
||||
|
||||
private:
|
||||
void update2dIntersectionViews();
|
||||
|
||||
caf::PdmField<bool> m_isActive;
|
||||
caf::PdmProxyValueField<QString> m_autoName;
|
||||
|
||||
|
@ -18,8 +18,9 @@
|
||||
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimIntersectionResultsDefinitionCollection, "RimIntersectionResultsDefinitionCollection" );
|
||||
|
||||
@ -42,10 +43,7 @@ RimIntersectionResultsDefinitionCollection::RimIntersectionResultsDefinitionColl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionResultsDefinitionCollection::~RimIntersectionResultsDefinitionCollection()
|
||||
{
|
||||
|
||||
}
|
||||
RimIntersectionResultsDefinitionCollection::~RimIntersectionResultsDefinitionCollection() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -82,7 +80,11 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
|
||||
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
if ( gridView )
|
||||
{
|
||||
gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
gridView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user