From 758f60236d1c30c161dcf783de5375fda15f3831 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Mon, 5 Jan 2015 21:28:04 +0100 Subject: [PATCH] MainBar: Prevent context menu from appearing A user can remove the main toolbar by using the right-click context menu and clicking on the single entry in it, effectively hiding the toolbar this way. There is no way to restore it except for closing PV and deleting the stored session file in ~/.config/sigrok. This patch prevents the context menu from appearing, thereby removing the ability to hide the main tool bar. --- pv/toolbars/mainbar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 50a90643..7a364013 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -85,6 +85,7 @@ MainBar::MainBar(Session &session, MainWindow &main_window) : setMovable(false); setFloatable(false); + setContextMenuPolicy(Qt::PreventContextMenu); // Device selector menu connect(&device_selector_, SIGNAL(device_selected()), -- 2.30.2