From ccbd55a0360d2cc7ee1766dcd724df4e58a376ce Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 20 Nov 2006 19:07:45 +0000 Subject: [PATCH] don't look twice in the map svn path=/trunk/playground/graphics/okular/; revision=606547 --- ui/pagepainter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp index 79edd6821..a60bf86e3 100644 --- a/ui/pagepainter.cpp +++ b/ui/pagepainter.cpp @@ -43,8 +43,9 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const Okular::Page const QPixmap * pixmap = 0; // if a pixmap is present for given id, use it - if ( page->m_pixmaps.contains( pixID ) ) - pixmap = page->m_pixmaps[ pixID ].m_pixmap; + QMap< int, Okular::Page::PixmapObject >::const_iterator itPixmap = page->m_pixmaps.find( pixID ); + if ( itPixmap != page->m_pixmaps.end() ) + pixmap = itPixmap.value().m_pixmap; // else find the closest match using pixmaps of other IDs (great optim!) else if ( !page->m_pixmaps.isEmpty() )