diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-11-30 13:58:43 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-11-30 14:09:02 (GMT) |
commit | 011d3aa2bdf49127169f0726b78e13e8e9bcd73e (patch) | |
tree | 2b1c5da212a2bc2f4efaa7324a172d365ff4e4cb /src/gui/graphicsview/qgraphicswidget.cpp | |
parent | 069d544f698ba020a329bdc45169ed08e8dd0357 (diff) | |
download | Qt-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/qgraphicswidget.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.cpp | 3 |
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: |