[QGIS Commit] r13640 - trunk/qgis/src/app/legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Jun 3 21:33:42 EDT 2010


Author: brushtyler
Date: 2010-06-03 21:33:41 -0400 (Thu, 03 Jun 2010)
New Revision: 13640

Modified:
   trunk/qgis/src/app/legend/qgslegend.cpp
Log:
fixed #2711: avoid jumping items in legend

Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2010-06-04 00:31:48 UTC (rev 13639)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2010-06-04 01:33:41 UTC (rev 13640)
@@ -377,6 +377,14 @@
     checkLayerOrderUpdate();
     return;
   }
+  
+  // make sure you are able to drag the item
+  QgsLegendItem::DRAG_ACTION action = dest->accept( origin );  
+  if ( action == QgsLegendItem::NO_ACTION )
+  {
+    QgsDebugMsg( "Drag NO_ACTION" );
+    return;
+  }
 
   {
     // Do the actual move here.



More information about the QGIS-commit mailing list