mirror of
				https://github.com/OPM/ResInsight.git
				synced 2025-02-25 18:55:39 -06:00 
			
		
		
		
	(#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:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user