Add command to check if a well path or sim well is selected in 3d view

This commit is contained in:
Rebecca Cox 2017-11-30 11:09:43 +01:00
parent 636b68cf52
commit 503645e688
2 changed files with 19 additions and 0 deletions

View File

@ -107,6 +107,23 @@ bool RicWellLogTools::wellHasRftData(const QString& wellName)
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicWellLogTools::isWellPathOrSimWellSelectedInView()
{
RiuSelectionManager* riuSelManager = RiuSelectionManager::instance();
RiuSelectionItem* selItem = riuSelManager->selectedItem(RiuSelectionManager::RUI_TEMPORARY);
RiuSimWellSelectionItem* simWellSelectionItem = static_cast<RiuSimWellSelectionItem*>(selItem);
if (simWellSelectionItem) return true;
RiuWellPathSelectionItem* wellPathSelectionItem = static_cast<RiuWellPathSelectionItem*>(selItem);
if (wellPathSelectionItem) return true;
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -39,6 +39,8 @@ public:
static RimWellPath* selectedWellPath();
static bool wellHasRftData(const QString& wellName);
static bool isWellPathOrSimWellSelectedInView();
static void addWellLogChannelsToPlotTrack(RimWellLogTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels);
static RimWellPath* selectedWellPathWithLogFile();