mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 14:17:52 -05:00
#14962: Update MSW segments when segment intervals change
Segment interval edits, creation and deletion did not trigger the automatic MSW segment update, so the segment visualization along the well path was stale.
This commit is contained in:
1 parent
d8dc1c051f
commit
81bcc2657d
4 files changed
+27
No files matched your search
@@ -35,6 +35,7 @@ void RicCreateSegmentIntervalFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
auto* interval = collection->createInterval( 0.0, 2000.0, collection->linerDiameter(), collection->roughnessFactor() );
|
||||
collection->updateConnectedEditors();
|
||||
collection->updateMswSegments();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( interval );
|
||||
|
||||
if ( auto* project = RimProject::current() ) project->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
|
||||
@@ -48,6 +48,7 @@ void RicDeleteSegmentIntervalFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( !collection ) return;
|
||||
collection->updateConnectedEditors();
|
||||
collection->updateMswSegments();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( collection );
|
||||
if ( auto* project = RimProject::current() ) project->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "RimMswCompletionParameters.h"
|
||||
#include "RimSegmentInterval.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
@@ -533,6 +534,27 @@ void RimSegmentCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedF
|
||||
m_maxSegmentLength.uiCapability()->setUiHidden( !m_enforceMaxSegmentLength() );
|
||||
caf::PdmUiObjectEditorHandle::updateUiAllObjectEditors();
|
||||
}
|
||||
|
||||
updateMswSegments();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSegmentCollection::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField )
|
||||
{
|
||||
updateMswSegments();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSegmentCollection::updateMswSegments()
|
||||
{
|
||||
if ( auto* wellPathCollection = RimWellPathCollection::instance() )
|
||||
{
|
||||
wellPathCollection->updateMswSegmentsForObject( this );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -103,8 +103,11 @@ public:
|
||||
static double defaultRoughnessFactor( RiaDefines::EclipseUnitSystem unitSystem );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override;
|
||||
|
||||
void updateMswSegments();
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||
|
||||
Reference in new issue
Block a user