#11896 Make sure the Fractures folder in view is visible when required

The Fractures folder in a 3D view becomes visible when the first fracture is added. Make sure that the Project Tree is recreated correctly.
This commit is contained in:
Magne Sjaastad 2024-11-21 13:48:05 +01:00
parent 3cc2958384
commit db20065e1e
4 changed files with 19 additions and 0 deletions

View File

@ -150,6 +150,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
coll->updateConnectedEditors();
}
RimWellPathFractureCollection::updateAfterFractureIsAdded();
proj->reloadCompletionTypeResultsInAllViews();
}

View File

@ -99,6 +99,8 @@ RimWellPathFracture* RicNewWellPathFractureFeature::addFracture( gsl::not_null<R
project->reloadCompletionTypeResultsInAllViews();
}
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();

View File

@ -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();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -46,6 +46,8 @@ public:
void removeFracture( RimWellPathFracture* fracture );
void deleteFractures();
static void updateAfterFractureIsAdded();
std::vector<RimWellPathFracture*> allFractures() const;
std::vector<RimWellPathFracture*> activeFractures() const;