summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-11-30 13:58:43 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-11-30 14:09:02 (GMT)
commit011d3aa2bdf49127169f0726b78e13e8e9bcd73e (patch)
tree2b1c5da212a2bc2f4efaa7324a172d365ff4e4cb /src/gui/graphicsview
parent069d544f698ba020a329bdc45169ed08e8dd0357 (diff)
downloadQt-011d3aa2bdf49127169f0726b78e13e8e9bcd73e.zip
Qt-011d3aa2bdf49127169f0726b78e13e8e9bcd73e.tar.gz
Qt-011d3aa2bdf49127169f0726b78e13e8e9bcd73e.tar.bz2
Only call updateFont if the font have changed.
When receiving the polish event, we call updateFont only if the font has changed (from the QApplication::font()). This avoid to clear sizeHints cache. Task-number:QTBUG-6272 Reviewed-by:janarve
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index f6c06d5..fe569f4 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -1301,7 +1301,8 @@ bool QGraphicsWidget::event(QEvent *event)
case QEvent::Polish:
polishEvent();
d->polished = true;
- d->updateFont(d->font);
+ if (!d->font.isCopyOf(QApplication::font()))
+ d->updateFont(d->font);
break;
case QEvent::WindowActivate:
case QEvent::WindowDeactivate: