mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
3D Well Log Curve (#2747): Add "Add new curve" command to 3D track and other curves.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user