Skip to content
Permalink
Browse files

Fix glitch on mouse-wheel zoom event

  • Loading branch information
Sandro Santilli
Sandro Santilli committed Dec 12, 2014
1 parent ea33122 commit 40e0d78b42474c698cc66e549bfb18d9867167b2
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/gui/qgsmapcanvasmap.cpp
@@ -50,6 +50,14 @@ void QgsMapCanvasMap::paint( QPainter* painter )
if ( mImage.size() != QSize( w, h ) )
{
QgsDebugMsg( QString( "map paint DIFFERENT SIZE: img %1,%2 item %3,%4" ).arg( mImage.width() ).arg( mImage.height() ).arg( w ).arg( h ) );
}

// TODO: this is an hack, we should instead make sure that
// the image passed here from QgsMapCanvas, via setContent,
// is pre-clipped in case of rotation.
// See http://hub.qgis.org/issues/11811
if ( ( mImage.width() > w && mImage.height() < h ) ||
( mImage.height() > h && mImage.width() < w ) ) {
int tX = ( w - mImage.width() ) / 2.0;
int tY = ( h - mImage.height() ) / 2.0;
int fX = 0;

0 comments on commit 40e0d78

Please sign in to comment.
You can’t perform that action at this time.