Skip to content

Commit 8d2c1f8

Browse files
author
brushtyler
committed
fixed #2711: avoid jumping items in legend
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13640 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e8519a4 commit 8d2c1f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/legend/qgslegend.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,14 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )
377377
checkLayerOrderUpdate();
378378
return;
379379
}
380+
381+
// make sure you are able to drag the item
382+
QgsLegendItem::DRAG_ACTION action = dest->accept( origin );
383+
if ( action == QgsLegendItem::NO_ACTION )
384+
{
385+
QgsDebugMsg( "Drag NO_ACTION" );
386+
return;
387+
}
380388

381389
{
382390
// Do the actual move here.

0 commit comments

Comments
 (0)