mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-29 08:30:17 -05:00
Auto-update MSW segments on UI changes (opt-in)
Adds an 'Auto Update Segments' toggle (default: on) to the MSW Segment Visualization group in WellPathCollection. When enabled, MSW segments are automatically recomputed and redrawn whenever the user modifies: - Well path geometry or targets - Perforation intervals - Fishbone laterals - Fractures - Well path fields The update is triggered via a new updateMswSegmentsForObject() method, which resolves the top-level well from the changed object, clears existing segments for all lateral wells in that group, recomputes segments using updateSegments(), and schedules a full redraw. When auto-update is disabled, an 'Update Segments' button is shown instead, allowing manual control.
This commit is contained in:
1 parent
a73067b6ea
commit
211ae24241
14 files changed
+156
-14
No files matched your search
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathGeometryDefTools.h"
|
||||
#include "RimWellPathTarget.h"
|
||||
|
||||
@@ -552,6 +553,22 @@ void RimWellPathGeometryDef::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
}
|
||||
|
||||
changed.send( false );
|
||||
|
||||
if ( auto wellPathCollection = RimWellPathCollection::instance() )
|
||||
{
|
||||
wellPathCollection->updateMswSegmentsForObject( this );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDef::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField )
|
||||
{
|
||||
if ( auto wellPathCollection = RimWellPathCollection::instance() )
|
||||
{
|
||||
wellPathCollection->updateMswSegmentsForObject( this );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user