Skip to content
Permalink
Browse files

Fix panning from overview map with non-zero rotation

  • Loading branch information
Sandro Santilli
Sandro Santilli committed Dec 30, 2014
1 parent 9d76247 commit 5a1df4a2d5827252e2513a66d028af58cce1216f
Showing with 1 addition and 10 deletions.
  1. +1 −10 src/gui/qgsmapoverviewcanvas.cpp
@@ -223,16 +223,7 @@ void QgsMapOverviewCanvas::mouseReleaseEvent( QMouseEvent * e )
QRect rect = mPanningWidget->geometry();

QgsPoint center = cXf.toMapCoordinates( rect.center() );
QgsRectangle oldExtent = mMapCanvas->extent();
QgsRectangle ext;
ext.setXMinimum( center.x() - oldExtent.width() / 2 );
ext.setXMaximum( center.x() + oldExtent.width() / 2 );
ext.setYMinimum( center.y() - oldExtent.height() / 2 );
ext.setYMaximum( center.y() + oldExtent.height() / 2 );

QgsDebugMsg( QString( "panning: new position: [%1,%2] [%3x%4]" ).arg( rect.left() ).arg( rect.top() ).arg( rect.width() ).arg( rect.height() ) );

mMapCanvas->setExtent( ext );
mMapCanvas->setCenter( center );
mMapCanvas->refresh();
}
}

0 comments on commit 5a1df4a

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