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:
Magne Sjaastad committed 2026-03-17 20:15:07 +01:00
1 parent a73067b6ea
commit 211ae24241
14 files changed
+156 -14

No files matched your search

@@ -555,13 +555,7 @@ void RimTools::colorLegendOptionItems( QList<caf::PdmOptionItemInfo>* options )
//--------------------------------------------------------------------------------------------------
RimWellPathCollection* RimTools::wellPathCollection()
{
RimProject* proj = RimProject::current();
if ( proj && proj->activeOilField() )
{
return proj->activeOilField()->wellPathCollection();
}
return nullptr;
return RimWellPathCollection::instance();
}
//--------------------------------------------------------------------------------------------------