#2036. WellLogFile close command

This commit is contained in:
Bjørn Erik Jensen
2017-10-25 11:30:10 +02:00
parent 4c223defec
commit b3f77d1d70
6 changed files with 131 additions and 0 deletions

View File

@@ -574,6 +574,14 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
commandIds << "RicWellPathDeleteFeature";
}
if (caf::CmdFeatureManager::instance()->getCommandFeature("RicWellLogFileCloseFeature")->canFeatureBeExecuted())
{
// Special delete command for Well paths
// Placed here to fit context menu location of general delete feature
commandIds << "Separator";
commandIds << "RicWellLogFileCloseFeature";
}
if ( caf::CmdFeatureManager::instance()->getCommandFeature("RicCloseCaseFeature")->canFeatureBeExecuted() )
{
commandIds << "Separator";

View File

@@ -650,6 +650,21 @@ void RimWellPath::addWellLogFile(RimWellLogFile* logFileInfo)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::removeWellLogFile(const RimWellLogFile* logFileInfo)
{
for (int i = 0; i < m_wellLogFiles.size(); i++)
{
if (m_wellLogFiles[i] == logFileInfo)
{
m_wellLogFiles.erase(i);
break;
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -65,6 +65,7 @@ public:
virtual ~RimWellPath();
void addWellLogFile(RimWellLogFile* logFileInfo);
void removeWellLogFile(const RimWellLogFile* logFileInfo);
virtual caf::PdmFieldHandle* userDescriptionField();
virtual caf::PdmFieldHandle* objectToggleField();