Skip to content

Commit

Permalink
#11896 Make sure the Fractures folder in view is visible when required
Browse files Browse the repository at this point in the history
The Fractures folder in a 3D view becomes visible when the first fracture is added. Make sure that the Project Tree is recreated correctly.
  • Loading branch information
magnesj committed Nov 21, 2024
1 parent 3cc2958 commit db20065
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
coll->updateConnectedEditors();
}

RimWellPathFractureCollection::updateAfterFractureIsAdded();

proj->reloadCompletionTypeResultsInAllViews();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "RimWellPathFractureCollection.h"

#include "Rim3dView.h"
#include "RimProject.h"
#include "RimWellPathFracture.h"

Expand Down Expand Up @@ -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();
}
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class RimWellPathFractureCollection : public RimCheckableNamedObject
void removeFracture( RimWellPathFracture* fracture );
void deleteFractures();

static void updateAfterFractureIsAdded();

std::vector<RimWellPathFracture*> allFractures() const;
std::vector<RimWellPathFracture*> activeFractures() const;

Expand Down

0 comments on commit db20065

Please sign in to comment.