summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:59:33 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:59:33 +0100
commit3f3be55835427ea9f1bbcc046e05ee538ca214d7 (patch)
tree09d1f54d114855c2b06cc505dfbf74c5890c8419 /src/widgets/graphicsview
parentae293c1cb220847194fba6dcebdbb9194837bb56 (diff)
parent9764f8602719676d1fa15e6fd1e7980af16bfc63 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp5
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 04047d8d0a..2d07e545c8 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -7634,7 +7634,10 @@ QGraphicsObject::~QGraphicsObject()
bool QGraphicsObject::event(QEvent *ev)
{
if (ev->type() == QEvent::StyleAnimationUpdate) {
- update();
+ if (isVisible()) {
+ ev->accept();
+ update();
+ }
return true;
}
return QObject::event(ev);
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index 4abb5e39e5..ccc51120a9 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -1409,9 +1409,14 @@ bool QGraphicsWidget::event(QEvent *event)
break;
case QEvent::WindowActivate:
case QEvent::WindowDeactivate:
- case QEvent::StyleAnimationUpdate:
update();
break;
+ case QEvent::StyleAnimationUpdate:
+ if (isVisible()) {
+ event->accept();
+ update();
+ }
+ break;
// Taken from QWidget::event
case QEvent::ActivationChange:
case QEvent::EnabledChange: