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
|
// Well log curve creation commands
|
||||||
|
if (firstHitPart && firstHitPart->sourceInfo())
|
||||||
{
|
{
|
||||||
RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast<RicNewWellLogFileCurveFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature"));
|
const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(firstHitPart->sourceInfo());
|
||||||
CVF_ASSERT(newWellLogFileCurveFeature);
|
if (wellPathSourceInfo)
|
||||||
|
{
|
||||||
menu.addAction(newWellLogFileCurveFeature->action());
|
RimWellPath* wellPath = wellPathSourceInfo->wellPath();
|
||||||
|
if (wellPath)
|
||||||
|
{
|
||||||
|
RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast<RicNewWellLogFileCurveFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogFileCurveFeature"));
|
||||||
|
CVF_ASSERT(newWellLogFileCurveFeature);
|
||||||
|
|
||||||
RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast<RicNewWellLogCurveExtractionFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature"));
|
menu.addAction(newWellLogFileCurveFeature->action());
|
||||||
CVF_ASSERT(newExtractionCurveFeature);
|
|
||||||
|
|
||||||
menu.addAction(newExtractionCurveFeature->action());
|
RicNewWellLogCurveExtractionFeature* newExtractionCurveFeature = dynamic_cast<RicNewWellLogCurveExtractionFeature*>(caf::CmdFeatureManager::instance()->getCommandFeature("RicNewWellLogCurveExtractionFeature"));
|
||||||
|
CVF_ASSERT(newExtractionCurveFeature);
|
||||||
|
|
||||||
|
menu.addAction(newExtractionCurveFeature->action());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// View Link commands
|
// View Link commands
|
||||||
|
Loading…
Reference in New Issue
Block a user