Skip to content

Commit 494b194

Browse files
committedJul 14, 2017
Fix build
1 parent 2d531e5 commit 494b194

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎src/gui/qgsmapcanvasmap.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ void QgsMapCanvasMap::paint( QPainter *painter )
7070

7171
/*Offset between 0/0 and mRect.xMinimum/mRect.yMinimum.
7272
We need to consider the offset, because mRect is not updated yet and there might be an offset*/
73-
QgsPoint pt = toMapCoordinates( QPoint( 0, 0 ) );
73+
QgsPointXY pt = toMapCoordinates( QPoint( 0, 0 ) );
7474
double offsetX = pt.x() - mRect.xMinimum();
7575
double offsetY = pt.y() - mRect.yMaximum();
7676

7777
//draw preview images first
78-
QMap< QgsRectangle, QImage >::const_iterator previewIt = mPreviewImages.constBegin();
79-
for ( ; previewIt != mPreviewImages.constEnd(); ++previewIt )
78+
QList< QPair< QImage, QgsRectangle > >::const_iterator imIt = mPreviewImages.constBegin();
79+
for ( ; imIt != mPreviewImages.constEnd(); ++imIt )
8080
{
81-
QPointF ul = toCanvasCoordinates( QgsPoint( previewIt.key().xMinimum() + offsetX, previewIt.key().yMaximum() + offsetY ) );
82-
QPointF lr = toCanvasCoordinates( QgsPoint( previewIt.key().xMaximum() + offsetX, previewIt.key().yMinimum() + offsetY ) );
83-
painter->drawImage( QRectF( ul.x(), ul.y(), lr.x() - ul.x(), lr.y() - ul.y() ), previewIt.value(), QRect( 0, 0, previewIt.value().width(), previewIt.value().height() ) );
81+
QPointF ul = toCanvasCoordinates( QgsPoint( imIt->second.xMinimum() + offsetX, imIt->second.yMaximum() + offsetY ) );
82+
QPointF lr = toCanvasCoordinates( QgsPoint( imIt->second.xMaximum() + offsetX, imIt->second.yMinimum() + offsetY ) );
83+
painter->drawImage( QRectF( ul.x(), ul.y(), lr.x() - ul.x(), lr.y() - ul.y() ), imIt->first, QRect( 0, 0, imIt->first.width(), imIt->first.height() ) );
8484
}
8585

8686
painter->drawImage( QRect( 0, 0, w, h ), mImage );

0 commit comments

Comments
 (0)
Please sign in to comment.