[QGIS Commit] r9142 - trunk/qgis/src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Aug 24 04:21:38 EDT 2008


Author: mhugent
Date: 2008-08-24 04:21:38 -0400 (Sun, 24 Aug 2008)
New Revision: 9142

Modified:
   trunk/qgis/src/gui/qgsmapcanvas.cpp
Log:
applied patch from smizuno to fix #1016

Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp	2008-08-24 04:38:19 UTC (rev 9141)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp	2008-08-24 08:21:38 UTC (rev 9142)
@@ -643,6 +643,8 @@
         refresh();
         break;
 
+	
+
       case Qt::Key_Space:
         QgsDebugMsg( "Pressing pan selector" );
 
@@ -654,6 +656,16 @@
         }
         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,10 +810,11 @@
     int height = lastSize.height();
     lastSize = QSize( -1, -1 );
 
+    //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 ) );
 
-    mMap->resize( QSize( width, height ) );
-
     // notify canvas items of change
     updateCanvasItemsPositions();
 



More information about the QGIS-commit mailing list