mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#539) Prevent context menu events to be propagated to parent
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
This commit is contained in:
parent
8de8100c3e
commit
4b95f2b807
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user