From 1af80575b764dd898bc2ce36eef87cfa288968b4 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 15 Apr 2019 19:31:25 +0200 Subject: [PATCH] Do not show context help if widget is visible That would trigger help twice/multiple times --- src/blackgui/guiapplication.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/blackgui/guiapplication.cpp b/src/blackgui/guiapplication.cpp index 569b1274f..02d06cf67 100644 --- a/src/blackgui/guiapplication.cpp +++ b/src/blackgui/guiapplication.cpp @@ -870,9 +870,12 @@ namespace BlackGui bool CGuiApplication::triggerShowHelp(const QWidget *widget, QEvent *event) { if (!widget) { return false; } - if (!event) { return false; } - if (event->type() != QEvent::EnterWhatsThisMode) { return false; } + if (!event) { return false; } + const QEvent::Type t = event->type(); + if (t != QEvent::EnterWhatsThisMode) { return false; } QWhatsThis::leaveWhatsThisMode(); + event->accept(); + if (!widget->isVisible()) { return true; } // ignore invisble ones const QPointer wp(widget); QTimer::singleShot(0, sGui, [ = ] {