(#501) Always displaying well log curve creation commands in the context menu

The command feature system handles enabled/disabled state.
This commit is contained in:
Pål Hagen 2015-09-22 10:02:03 +02:00
parent ef87f63b63
commit be29a06883

View File

@ -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<RicNewWellLogFileCurveFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature"));
CVF_ASSERT(newWellLogFileCurveFeature);
menu.addAction(newWellLogFileCurveFeature->action());
RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast<RicNewWellLogCurveExtractionFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature"));
CVF_ASSERT(newExtractionCurveFeature);
menu.addAction(newExtractionCurveFeature->action());
}
}
}
// Well log curve creation commands
{
RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast<RicNewWellLogFileCurveFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature"));
CVF_ASSERT(newWellLogFileCurveFeature);
menu.addAction(newWellLogFileCurveFeature->action());
RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast<RicNewWellLogCurveExtractionFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature"));
CVF_ASSERT(newExtractionCurveFeature);
menu.addAction(newExtractionCurveFeature->action());
}
// View Link commands
{
QStringList commandIds;