Use setImage workaround on all OS X versions.
The painting bug that we are working around/fixing here has been observed on 10.7 as well. Change-Id: Ic29421bcc84405afa085af2f0ed2bc554c684f98 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
b98b11fa03
commit
a890c78980
@ -73,12 +73,9 @@ void QCocoaBackingStore::flush(QWindow *widget, const QRegion ®ion, const QPo
|
||||
NSRect rect = NSMakeRect(geo.x(), geo.y(), geo.width(), geo.height());
|
||||
QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window()->handle());
|
||||
if (cocoaWindow) {
|
||||
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_8) {
|
||||
// Workaround for malfunctioning displayRect on 10.8 where
|
||||
// calling it seems to have no effect. Call setImage like
|
||||
// resize() does.
|
||||
[cocoaWindow->m_contentView setImage:m_image];
|
||||
}
|
||||
// setImage call is needed here to make the displayRect call
|
||||
// have effect - even if the image has not changed.
|
||||
[cocoaWindow->m_contentView setImage:m_image];
|
||||
[cocoaWindow->m_contentView displayRect:rect];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user