Skip to content
Permalink
Browse files
applied patch to fix #699
git-svn-id: http://svn.osgeo.org/qgis/trunk@13641 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Jun 4, 2010
1 parent 0d4c08a commit 4c745d886f998b295a9794ed59006c0f20bc06d5
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/app/legend/qgslegend.cpp
@@ -356,20 +356,23 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )

mMousePressedFlag = false;

if ( !mItemBeingMoved )
// move only if we have a valid item and drop place
// otherwise reset the stored values
if ( !mItemBeingMoved || !mDropTarget )
{
mItemBeingMoved = NULL;
mDropTarget = NULL;
return;
}

hideLine();

QTreeWidgetItem *destItem = mDropTarget;

QgsLegendItem* origin = dynamic_cast<QgsLegendItem *>( mItemBeingMoved );
mItemBeingMoved = NULL;
QModelIndex oldIndex = indexFromItem( origin );

QgsLegendItem* dest = dynamic_cast<QgsLegendItem *>( destItem );
QgsLegendItem* dest = dynamic_cast<QgsLegendItem *>( mDropTarget );
mDropTarget = NULL;

// no change?
if ( !dest || !origin || ( dest == origin ) )

0 comments on commit 4c745d8

Please sign in to comment.