mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 03:35:38 +08:00
Do not show context help if widget is visible
That would trigger help twice/multiple times
This commit is contained in:
@@ -870,9 +870,12 @@ namespace BlackGui
|
|||||||
bool CGuiApplication::triggerShowHelp(const QWidget *widget, QEvent *event)
|
bool CGuiApplication::triggerShowHelp(const QWidget *widget, QEvent *event)
|
||||||
{
|
{
|
||||||
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, [ = ]
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user