Skip to content

Commit

Permalink
applied patch from smizuno to fix #1016
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9142 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 24, 2008
1 parent 22b8633 commit 24f36ea
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
refresh();
break;



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

Expand All @@ -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 )
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 24f36ea

Please sign in to comment.