3D Well Log Curve (#2747): Add "Add new curve" command to 3D track and other curves.

This commit is contained in:
Gaute Lindkvist
2018-04-19 11:26:03 +02:00
parent 32fb519073
commit 4dc9d1ba8a
6 changed files with 71 additions and 18 deletions

View File

@@ -84,6 +84,26 @@ RimWellPath* RicWellLogTools::selectedWellPath()
return selection.size() > 0 ? selection[0] : nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPath* RicWellLogTools::findWellPathFromSelection()
{
std::vector<caf::PdmObject*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0)
{
caf::PdmObject* firstSelection = selection[0];
RimWellPath* wellPath;
firstSelection->firstAncestorOrThisOfType(wellPath);
if (wellPath)
{
return wellPath;
}
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -170,6 +190,19 @@ RimWellPath* RicWellLogTools::selectedWellPathWithLogFile()
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPath* RicWellLogTools::findWellPathWithLogFileFromSelection()
{
RimWellPath* wellPath = findWellPathFromSelection();
if (wellPath->wellLogFiles().size() > 0)
{
return wellPath;
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------