Skip to content
Permalink
Browse files
applied patch from smizuno to fix #1016
git-svn-id: http://svn.osgeo.org/qgis/trunk@9142 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 24, 2008
1 parent cadc29d commit d6e4c29b18bdeb91c5caa0bdf07e82f6af90cf16
Showing with 15 additions and 2 deletions.
  1. +15 −2 src/gui/qgsmapcanvas.cpp
@@ -643,6 +643,8 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
refresh();
break;



case Qt::Key_Space:
QgsDebugMsg( "Pressing pan selector" );

@@ -654,6 +656,16 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
}
break;

case Qt::Key_PageUp:
QgsDebugMsg("Zoom in");
zoom(true);
break;

case Qt::Key_PageDown:
QgsDebugMsg("Zoom out");
zoom(false);
break;

default:
// Pass it on
if ( mMapTool )
@@ -798,9 +810,10 @@ void QgsMapCanvas::resizeEvent( QResizeEvent * e )
int height = lastSize.height();
lastSize = QSize( -1, -1 );

mScene->setSceneRect( QRectF( 0, 0, width, height ) );

//set map size before scene size seems to solve the white box problem
//when moving rubber bands
mMap->resize( QSize( width, height ) );
mScene->setSceneRect( QRectF( 0, 0, width, height ) );

// notify canvas items of change
updateCanvasItemsPositions();

0 comments on commit d6e4c29

Please sign in to comment.