Skip to content
Permalink
Browse files
applied patch to fix #699
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13641 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Jun 4, 2010
1 parent 8d2c1f8 commit 069333958e09c5fee45d4c58d56bb94f0ef27ba4
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 0693339

Please sign in to comment.