Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 d6e4c29
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/gui/qgsmapcanvas.cpp
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 d6e4c29

Please sign in to comment.