From: Soeren Apel Date: Mon, 5 Jan 2015 20:28:04 +0000 (+0100) Subject: MainBar: Prevent context menu from appearing X-Git-Tag: pulseview-0.3.0~263 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=758f60236d1c30c161dcf783de5375fda15f3831;p=pulseview.git 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. --- 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()),