From 16f8341de385521821717857cdcfd03a4276ecd8 Mon Sep 17 00:00:00 2001 From: PlutonicOverkill Date: Wed, 10 May 2017 21:24:12 +1200 Subject: [PATCH] Prevent context menu appearing for modifier settings --- apps/opencs/model/prefs/modifiersetting.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/opencs/model/prefs/modifiersetting.cpp b/apps/opencs/model/prefs/modifiersetting.cpp index b70d39714..6273575e9 100644 --- a/apps/opencs/model/prefs/modifiersetting.cpp +++ b/apps/opencs/model/prefs/modifiersetting.cpp @@ -32,6 +32,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)));