File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -223,16 +223,7 @@ void QgsMapOverviewCanvas::mouseReleaseEvent( QMouseEvent * e )
223
223
QRect rect = mPanningWidget ->geometry ();
224
224
225
225
QgsPoint center = cXf.toMapCoordinates ( rect.center () );
226
- QgsRectangle oldExtent = mMapCanvas ->extent ();
227
- QgsRectangle ext;
228
- ext.setXMinimum ( center.x () - oldExtent.width () / 2 );
229
- ext.setXMaximum ( center.x () + oldExtent.width () / 2 );
230
- ext.setYMinimum ( center.y () - oldExtent.height () / 2 );
231
- ext.setYMaximum ( center.y () + oldExtent.height () / 2 );
232
-
233
- QgsDebugMsg ( QString ( " panning: new position: [%1,%2] [%3x%4]" ).arg ( rect.left () ).arg ( rect.top () ).arg ( rect.width () ).arg ( rect.height () ) );
234
-
235
- mMapCanvas ->setExtent ( ext );
226
+ mMapCanvas ->setCenter ( center );
236
227
mMapCanvas ->refresh ();
237
228
}
238
229
}
You can’t perform that action at this time.
0 commit comments