mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#468) Showing well log plot context menu items only when a well path is picked
This commit is contained in:
parent
430ea86962
commit
ff1f7b24b5
@ -204,16 +204,25 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
||||
}
|
||||
|
||||
// Well log curve creation commands
|
||||
if (firstHitPart && firstHitPart->sourceInfo())
|
||||
{
|
||||
RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast<RicNewWellLogFileCurveFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature"));
|
||||
CVF_ASSERT(newWellLogFileCurveFeature);
|
||||
const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(firstHitPart->sourceInfo());
|
||||
if (wellPathSourceInfo)
|
||||
{
|
||||
RimWellPath* wellPath = wellPathSourceInfo->wellPath();
|
||||
if (wellPath)
|
||||
{
|
||||
RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast<RicNewWellLogFileCurveFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature"));
|
||||
CVF_ASSERT(newWellLogFileCurveFeature);
|
||||
|
||||
menu.addAction(newWellLogFileCurveFeature->action());
|
||||
menu.addAction(newWellLogFileCurveFeature->action());
|
||||
|
||||
RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast<RicNewWellLogCurveExtractionFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature"));
|
||||
CVF_ASSERT(newExtractionCurveFeature);
|
||||
RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast<RicNewWellLogCurveExtractionFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature"));
|
||||
CVF_ASSERT(newExtractionCurveFeature);
|
||||
|
||||
menu.addAction(newExtractionCurveFeature->action());
|
||||
menu.addAction(newExtractionCurveFeature->action());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// View Link commands
|
||||
|
Loading…
Reference in New Issue
Block a user