diff --git a/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp index 45786e161f..9984a7e425 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp @@ -150,6 +150,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures() coll->updateConnectedEditors(); } + RimWellPathFractureCollection::updateAfterFractureIsAdded(); + proj->reloadCompletionTypeResultsInAllViews(); } diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp index 03f85d9437..2e274e9d7a 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp @@ -99,6 +99,8 @@ RimWellPathFracture* RicNewWellPathFractureFeature::addFracture( gsl::not_nullreloadCompletionTypeResultsInAllViews(); } + RimWellPathFractureCollection::updateAfterFractureIsAdded(); + // Update well path, as the completion collections are hidden if empty. This update will make sure that the folder // and completion is visible wellPath->updateAllRequiredEditors(); diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.cpp index 0a006e22d6..3402ab40cd 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.cpp @@ -18,6 +18,7 @@ #include "RimWellPathFractureCollection.h" +#include "Rim3dView.h" #include "RimProject.h" #include "RimWellPathFracture.h" @@ -79,6 +80,18 @@ void RimWellPathFractureCollection::deleteFractures() m_fractures.deleteChildren(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellPathFractureCollection::updateAfterFractureIsAdded() +{ + // When a fracture is created, update Project Tree for a view to make sure the Fractures object becomes visible + for ( auto view : RimProject::current()->allViews() ) + { + view->updateAllRequiredEditors(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.h b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.h index b30f717802..384b7ce776 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFractureCollection.h @@ -46,6 +46,8 @@ class RimWellPathFractureCollection : public RimCheckableNamedObject void removeFracture( RimWellPathFracture* fracture ); void deleteFractures(); + static void updateAfterFractureIsAdded(); + std::vector allFractures() const; std::vector activeFractures() const;