(#468) Showing well log plot context menu items only when a well path is picked

This commit is contained in:
Pål Hagen 2015-09-22 13:14:08 +02:00
parent 430ea86962
commit ff1f7b24b5

View File

@ -204,6 +204,13 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
}
// Well log curve creation commands
if (firstHitPart && firstHitPart->sourceInfo())
{
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);
@ -215,6 +222,8 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
menu.addAction(newExtractionCurveFeature->action());
}
}
}
// View Link commands
{