Skip to content

Commit

Permalink
(#539) Prevent context menu events to be propagated to parent
Browse files Browse the repository at this point in the history
When a context menu is created in the viewer is, and the action
triggered is displaying a dialog,
the context menu of QMainWindow is displayed after the action has
finished
Setting this policy will make sure the handling is not deferred to the
widget's parent,
which solves the problem - Qt::PreventContextMenu
  • Loading branch information
magnesj committed Oct 21, 2015
1 parent 8de8100 commit 4b95f2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ApplicationCode/UserInterface/RiuViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent)
m_animationProgress->setFont(regTestFont);
m_histogramWidget->setFont(regTestFont);
}

// When a context menu is created in the viewer is, and the action triggered is displaying a dialog,
// the context menu of QMainWindow is displayed after the action has finished
// Setting this policy will make sure the handling is not deferred to the widget's parent,
// which solves the problem
setContextMenuPolicy(Qt::PreventContextMenu);
}


Expand Down

0 comments on commit 4b95f2b

Please sign in to comment.