Always check both before redirecting.

This commit is contained in:
Eike Hein 2015-12-22 20:36:10 +01:00
parent c64a94a265
commit fa0030a9ac

View File

@ -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();
} }
}); });