From c2f427f48d64721b74a36210d757f9af687fc934 Mon Sep 17 00:00:00 2001 From: PlutonicOverkill Date: Wed, 10 May 2017 20:43:52 +1200 Subject: [PATCH] Prevent context menu appearing when right-clicking shortcut setting --- apps/opencs/model/prefs/shortcutsetting.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/opencs/model/prefs/shortcutsetting.cpp b/apps/opencs/model/prefs/shortcutsetting.cpp index 418559475d..4c3931e99f 100644 --- a/apps/opencs/model/prefs/shortcutsetting.cpp +++ b/apps/opencs/model/prefs/shortcutsetting.cpp @@ -40,6 +40,10 @@ namespace CSMPrefs widget->setCheckable(true); widget->installEventFilter(this); + + // right clicking on button sets shortcut to RMB, so context menu should not appear + widget->setContextMenuPolicy(Qt::ContextMenuPolicy::PreventContextMenu); + mButton = widget; connect(widget, SIGNAL(toggled(bool)), this, SLOT(buttonToggled(bool)));