From be29a06883dedd4a3348fb10481c8490f3a768ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Tue, 22 Sep 2015 10:02:03 +0200 Subject: [PATCH] (#501) Always displaying well log curve creation commands in the context menu The command feature system handles enabled/disabled state. --- .../UserInterface/RiuViewerCommands.cpp | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ApplicationCode/UserInterface/RiuViewerCommands.cpp b/ApplicationCode/UserInterface/RiuViewerCommands.cpp index 93ade393c0..4582c82dbf 100644 --- a/ApplicationCode/UserInterface/RiuViewerCommands.cpp +++ b/ApplicationCode/UserInterface/RiuViewerCommands.cpp @@ -215,20 +215,23 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event) // TODO: Handle selection through mouse events outside this method, or after ray picking above caf::SelectionManager::instance()->setSelectedItem(wellPath); RiaApplication::instance()->project()->updateConnectedEditors(); - - RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature")); - CVF_ASSERT(newWellLogFileCurveFeature); - - menu.addAction(newWellLogFileCurveFeature->action()); - - RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature")); - CVF_ASSERT(newExtractionCurveFeature); - - menu.addAction(newExtractionCurveFeature->action()); } } } + // Well log curve creation commands + { + RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature")); + CVF_ASSERT(newWellLogFileCurveFeature); + + menu.addAction(newWellLogFileCurveFeature->action()); + + RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature")); + CVF_ASSERT(newExtractionCurveFeature); + + menu.addAction(newExtractionCurveFeature->action()); + } + // View Link commands { QStringList commandIds;