diff --git a/ApplicationCode/Commands/RicWellLogTools.cpp b/ApplicationCode/Commands/RicWellLogTools.cpp index c83d69ad83..57a3cfe116 100644 --- a/ApplicationCode/Commands/RicWellLogTools.cpp +++ b/ApplicationCode/Commands/RicWellLogTools.cpp @@ -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(selItem); + if (simWellSelectionItem) return true; + + RiuWellPathSelectionItem* wellPathSelectionItem = static_cast(selItem); + if (wellPathSelectionItem) return true; + + return false; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/RicWellLogTools.h b/ApplicationCode/Commands/RicWellLogTools.h index 3a2b2fe772..6c8c580a19 100644 --- a/ApplicationCode/Commands/RicWellLogTools.h +++ b/ApplicationCode/Commands/RicWellLogTools.h @@ -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& wellLogFileChannels); static RimWellPath* selectedWellPathWithLogFile();