mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
ResInsight: Migrate project data model to attribute map
This commit is contained in:
1 parent
c57200331e
commit
064ac45da0
234 files changed
+1232
-3168
No files matched your search
@@ -103,6 +103,12 @@ RimWellPath::RimWellPath()
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "WellPath", ":/Well.svg", "", "", "WellPath", "A ResInsight Well Path" );
|
||||
|
||||
// The nodes for well paths are created by the well path collection object. When a well path object is asked to
|
||||
// be updated in the project tree, always rebuild the tree from the well path collection object.
|
||||
uiCapability()->setAttribute<std::function<caf::PdmObjectHandle*()>>( caf::PdmUiTreeViewEditor::Keys::OBJECT_FOR_UPDATE_OF_UI_TREE,
|
||||
[]() -> caf::PdmObjectHandle*
|
||||
{ return RimWellPathCollection::instance(); } );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_name, "Name", "Name" );
|
||||
m_name.registerKeywordAlias( "WellPathName" );
|
||||
|
||||
@@ -880,21 +886,6 @@ void RimWellPath::copyCompletionSettings( RimWellPath* from, RimWellPath* to )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
auto myAttr = dynamic_cast<caf::PdmUiTreeViewEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
// The nodes for well paths are created by the well path collection object. When a well path object is asked to
|
||||
// be updated in the project tree, always rebuild the tree from the well path collection object.
|
||||
|
||||
myAttr->objectForUpdateOfUiTree = RimWellPathCollection::instance();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user