Do not show context help if widget is visible

That would trigger help twice/multiple times
This commit is contained in:
Klaus Basan
2019-04-15 19:31:25 +02:00
parent 4ed0d6befd
commit 1af80575b7

View File

@@ -871,8 +871,11 @@ namespace BlackGui
{ {
if (!widget) { return false; } if (!widget) { return false; }
if (!event) { return false; } if (!event) { return false; }
if (event->type() != QEvent::EnterWhatsThisMode) { return false; } const QEvent::Type t = event->type();
if (t != QEvent::EnterWhatsThisMode) { return false; }
QWhatsThis::leaveWhatsThisMode(); QWhatsThis::leaveWhatsThisMode();
event->accept();
if (!widget->isVisible()) { return true; } // ignore invisble ones
const QPointer<const QWidget> wp(widget); const QPointer<const QWidget> wp(widget);
QTimer::singleShot(0, sGui, [ = ] QTimer::singleShot(0, sGui, [ = ]
{ {