mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
Adds MSW name grouping pattern functionality
Implements a new command to set the MSW grouping pattern, and ensures that the pattern is only updated if a new value is set.
This commit is contained in:
1 parent
e79ff8e7a7
commit
c6ed12be92
3 files changed
+54
-2
No files matched your search
@@ -182,3 +182,31 @@ QString RimcWellPathCollection_importWellPathFromPointsInternal::classKeywordRet
|
||||
{
|
||||
return RimPointBasedWellPath::classKeywordStatic();
|
||||
}
|
||||
|
||||
CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimWellPathCollection, RimcWellPathCollection_setMswNameGrouping, "setMswNameGrouping" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimcWellPathCollection_setMswNameGrouping::RimcWellPathCollection_setMswNameGrouping( caf::PdmObjectHandle* self )
|
||||
: caf::PdmVoidObjectMethod( self )
|
||||
{
|
||||
CAF_PDM_InitObject( "Set MSW Name Grouping" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_mswNameGrouping, "MswNameGrouping", "MSW Name Grouping" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::expected<caf::PdmObjectHandle*, QString> RimcWellPathCollection_setMswNameGrouping::execute()
|
||||
{
|
||||
auto wellPathCollection = self<RimWellPathCollection>();
|
||||
if ( !wellPathCollection )
|
||||
{
|
||||
return std::unexpected( QString( "Well path collection is null. Cannot add well path." ) );
|
||||
}
|
||||
|
||||
wellPathCollection->setMswWellPattern( m_mswNameGrouping() );
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
Reference in new issue
Block a user