diff options
Diffstat (limited to 'src/widgets/styles/qstyle_p.h')
-rw-r--r-- | src/widgets/styles/qstyle_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h index 70221f6d8f..9f25492173 100644 --- a/src/widgets/styles/qstyle_p.h +++ b/src/widgets/styles/qstyle_p.h @@ -96,8 +96,8 @@ inline QPixmap styleCachePixmap(const QSize &size) QPainter *p = painter; \ QString unique = QStyleHelper::uniqueName((a), option, option->rect.size()); \ int txType = painter->deviceTransform().type() | painter->worldTransform().type(); \ - bool doPixmapCache = (txType <= QTransform::TxTranslate) \ - || (painter->deviceTransform().type() == QTransform::TxScale); \ + bool doPixmapCache = (!option->rect.isEmpty()) \ + && ((txType <= QTransform::TxTranslate) || (painter->deviceTransform().type() == QTransform::TxScale)); \ if (doPixmapCache && QPixmapCache::find(unique, internalPixmapCache)) { \ painter->drawPixmap(option->rect.topLeft(), internalPixmapCache); \ } else { \ |