QtQuick: fix visual corruption

Don't request async pixmaps then render them straight away.
This commit is contained in:
Aleix Pol 2018-04-25 12:49:53 +02:00
parent c51419dd9f
commit 19222f27ca

View file

@ -312,10 +312,9 @@ void PageItem::paint(QPainter *painter)
qreal dpr = window()->devicePixelRatio();
if (m_intentionalDraw) {
QLinkedList<Okular::PixmapRequest *> requestedPixmaps;
requestedPixmaps.push_back(new Okular::PixmapRequest(observer, m_viewPort.pageNumber, width() * dpr, height() * dpr, priority, Okular::PixmapRequest::Asynchronous));
auto request = new Okular::PixmapRequest(observer, m_viewPort.pageNumber, width() * dpr, height() * dpr, priority, Okular::PixmapRequest::NoFeature);
const Okular::Document::PixmapRequestFlag prf = m_isThumbnail ? Okular::Document::NoOption : Okular::Document::RemoveAllPrevious;
m_documentItem.data()->document()->requestPixmaps(requestedPixmaps, prf);
m_documentItem.data()->document()->requestPixmaps({request}, prf);
m_intentionalDraw = false;
}
const int flags = PagePainter::Accessibility | PagePainter::Highlights | PagePainter::Annotations;