From 9e933a9c1c84d82f6d30a8a82bd0edc2b72c26e4 Mon Sep 17 00:00:00 2001 From: astridkbjorke Date: Thu, 5 Jan 2017 14:52:59 +0100 Subject: [PATCH] #1040 - pre-proto - Calling scheduleCreateDisplayModelAndRedraw when creating / deleting fractures --- ApplicationCode/Commands/RicDeleteItemExec.cpp | 11 +++++++++++ .../Commands/RicNewSimWellFractureAtPosFeature.cpp | 2 ++ .../Commands/RicNewSimWellFractureFeature.cpp | 6 ++++++ .../Commands/RicNewWellPathFractureAtPosFeature.cpp | 3 +++ .../Commands/RicNewWellPathFractureFeature.cpp | 2 ++ 5 files changed, 24 insertions(+) diff --git a/ApplicationCode/Commands/RicDeleteItemExec.cpp b/ApplicationCode/Commands/RicDeleteItemExec.cpp index 0b0f36c09f..c06af5e286 100644 --- a/ApplicationCode/Commands/RicDeleteItemExec.cpp +++ b/ApplicationCode/Commands/RicDeleteItemExec.cpp @@ -41,6 +41,7 @@ #include "cafSelectionManager.h" #include "RimFormationNamesCollection.h" #include "RimCase.h" +#include "RimSimWellFractureCollection.h" namespace caf @@ -121,6 +122,16 @@ void RicDeleteItemExec::redo() view->scheduleCreateDisplayModelAndRedraw(); } + // SimWell Fractures + RimSimWellFractureCollection* simWellFractureColl; + parentObj->firstAncestorOrThisOfType(simWellFractureColl); + if (view && simWellFractureColl) + { + view->scheduleCreateDisplayModelAndRedraw(); + } + + + // Well paths RimWellPathCollection* wellPathColl; diff --git a/ApplicationCode/Commands/RicNewSimWellFractureAtPosFeature.cpp b/ApplicationCode/Commands/RicNewSimWellFractureAtPosFeature.cpp index 4af6011811..7aeccf01bd 100644 --- a/ApplicationCode/Commands/RicNewSimWellFractureAtPosFeature.cpp +++ b/ApplicationCode/Commands/RicNewSimWellFractureAtPosFeature.cpp @@ -91,6 +91,8 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked) fractureCollection->updateConnectedEditors(); RiuMainWindow::instance()->selectAsCurrentItem(fracture); + activeView->scheduleCreateDisplayModelAndRedraw(); + } diff --git a/ApplicationCode/Commands/RicNewSimWellFractureFeature.cpp b/ApplicationCode/Commands/RicNewSimWellFractureFeature.cpp index 0d9eb9cb69..cf3847057c 100644 --- a/ApplicationCode/Commands/RicNewSimWellFractureFeature.cpp +++ b/ApplicationCode/Commands/RicNewSimWellFractureFeature.cpp @@ -36,6 +36,7 @@ #include "cvfAssert.h" #include +#include "RimEclipseView.h" CAF_CMD_SOURCE_INIT(RicNewSimWellFractureFeature, "RicNewSimWellFractureFeature"); @@ -74,6 +75,11 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked) fractureCollection->updateConnectedEditors(); RiuMainWindow::instance()->selectAsCurrentItem(fracture); + + RimEclipseView* mainView = nullptr; + objHandle->firstAncestorOrThisOfType(mainView); + if (mainView) mainView->scheduleCreateDisplayModelAndRedraw(); + } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/RicNewWellPathFractureAtPosFeature.cpp b/ApplicationCode/Commands/RicNewWellPathFractureAtPosFeature.cpp index f64dca54bf..14c564d14a 100644 --- a/ApplicationCode/Commands/RicNewWellPathFractureAtPosFeature.cpp +++ b/ApplicationCode/Commands/RicNewWellPathFractureAtPosFeature.cpp @@ -97,6 +97,9 @@ void RicNewWellPathFractureAtPosFeature::onActionTriggered(bool isChecked) fractureCollection->updateConnectedEditors(); RiuMainWindow::instance()->selectAsCurrentItem(fracture); + + activeView->scheduleCreateDisplayModelAndRedraw(); + } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/RicNewWellPathFractureFeature.cpp b/ApplicationCode/Commands/RicNewWellPathFractureFeature.cpp index 57cd9e4ef4..82cc7e9dd6 100644 --- a/ApplicationCode/Commands/RicNewWellPathFractureFeature.cpp +++ b/ApplicationCode/Commands/RicNewWellPathFractureFeature.cpp @@ -75,6 +75,8 @@ void RicNewWellPathFractureFeature::onActionTriggered(bool isChecked) fractureCollection->updateConnectedEditors(); RiuMainWindow::instance()->selectAsCurrentItem(fracture); + + wellPathColl->scheduleGeometryRegenAndRedrawViews(); } //--------------------------------------------------------------------------------------------------