summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 1551944..867880c 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -3504,7 +3504,9 @@ bool QGraphicsScene::event(QEvent *event)
}
break;
case QEvent::WindowDeactivate:
- if (!--d->activationRefCount) {
+ if (d->activationRefCount > 0)
+ --d->activationRefCount;
+ if (!d->activationRefCount) {
if (d->activePanel) {
// Deactivate the active panel (but keep it so we can
// reactivate it later).