Always check both before redirecting.
This commit is contained in:
parent
c64a94a265
commit
fa0030a9ac
@ -101,14 +101,14 @@ WindowThumbnail::WindowThumbnail(QQuickItem *parent)
|
|||||||
connect(this, &QQuickItem::enabledChanged, [this]() {
|
connect(this, &QQuickItem::enabledChanged, [this]() {
|
||||||
if (!isEnabled()) {
|
if (!isEnabled()) {
|
||||||
stopRedirecting();
|
stopRedirecting();
|
||||||
} else {
|
} else if (isVisible()) {
|
||||||
startRedirecting();
|
startRedirecting();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(this, &QQuickItem::visibleChanged, [this]() {
|
connect(this, &QQuickItem::visibleChanged, [this]() {
|
||||||
if (!isVisible()) {
|
if (!isVisible()) {
|
||||||
stopRedirecting();
|
stopRedirecting();
|
||||||
} else {
|
} else if (isEnabled()) {
|
||||||
startRedirecting();
|
startRedirecting();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user