[QGIS Commit] r9664 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Nov 18 08:13:15 EST 2008


Author: wonder
Date: 2008-11-18 08:13:14 -0500 (Tue, 18 Nov 2008)
New Revision: 9664

Modified:
   trunk/qgis/src/app/qgsmaptooladdvertex.cpp
   trunk/qgis/src/app/qgsmaptoolcapture.cpp
   trunk/qgis/src/app/qgsmaptooldeletevertex.cpp
   trunk/qgis/src/app/qgsmaptoolmovefeature.cpp
   trunk/qgis/src/app/qgsmaptoolmovevertex.cpp
Log:
If map tool implements own deactivate() method, it _should_ call also QgsMapTool::deactivate()
otherwise some things like deactivation of associated action/button won't work properly.


Modified: trunk/qgis/src/app/qgsmaptooladdvertex.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooladdvertex.cpp	2008-11-18 12:31:41 UTC (rev 9663)
+++ trunk/qgis/src/app/qgsmaptooladdvertex.cpp	2008-11-18 13:13:14 UTC (rev 9664)
@@ -121,4 +121,6 @@
 {
   delete mRubberBand;
   mRubberBand = 0;
+
+  QgsMapTool::deactivate();
 }

Modified: trunk/qgis/src/app/qgsmaptoolcapture.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolcapture.cpp	2008-11-18 12:31:41 UTC (rev 9663)
+++ trunk/qgis/src/app/qgsmaptoolcapture.cpp	2008-11-18 13:13:14 UTC (rev 9664)
@@ -83,6 +83,8 @@
   delete mRubberBand;
   mRubberBand = 0;
   mCaptureList.clear();
+
+  QgsMapTool::deactivate();
 }
 
 int QgsMapToolCapture::addVertex( const QPoint& p )

Modified: trunk/qgis/src/app/qgsmaptooldeletevertex.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooldeletevertex.cpp	2008-11-18 12:31:41 UTC (rev 9663)
+++ trunk/qgis/src/app/qgsmaptooldeletevertex.cpp	2008-11-18 13:13:14 UTC (rev 9664)
@@ -93,4 +93,6 @@
 {
   delete mCross;
   mCross = 0;
+
+  QgsMapTool::deactivate();
 }

Modified: trunk/qgis/src/app/qgsmaptoolmovefeature.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolmovefeature.cpp	2008-11-18 12:31:41 UTC (rev 9663)
+++ trunk/qgis/src/app/qgsmaptoolmovefeature.cpp	2008-11-18 13:13:14 UTC (rev 9664)
@@ -150,4 +150,6 @@
   //delete rubber band
   delete mRubberBand;
   mRubberBand = 0;
+
+  QgsMapTool::deactivate();
 }

Modified: trunk/qgis/src/app/qgsmaptoolmovevertex.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolmovevertex.cpp	2008-11-18 12:31:41 UTC (rev 9663)
+++ trunk/qgis/src/app/qgsmaptoolmovevertex.cpp	2008-11-18 13:13:14 UTC (rev 9664)
@@ -188,6 +188,8 @@
 void QgsMapToolMoveVertex::deactivate()
 {
   removeRubberBands();
+
+  QgsMapTool::deactivate();
 }
 
 void QgsMapToolMoveVertex::removeRubberBands()



More information about the QGIS-commit mailing list