Skip to content

Commit

Permalink
Fix for ticket 1745 (QGis crashes dragging a Legend Layer File over a…
Browse files Browse the repository at this point in the history
… Legend Layer File Group)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11206 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 29, 2009
1 parent a52d3c8 commit 89b5de5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,26 +250,26 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
QgsLegendItem::DRAG_ACTION action = dest->accept( origin );
if ( yCoordAboveCenter( dest, e->y() ) ) //over center of item
{

if ( action == QgsLegendItem::REORDER || action == QgsLegendItem::INSERT )
if ( action == QgsLegendItem::REORDER )
{
QgsDebugMsg( "mouseMoveEvent::REORDER/INSERT top half" );
if ( origin->nextSibling() != dest )
{
if ( origin->parent() != dest->parent() )
{
moveItem( origin, dest );
moveItem( dest, origin );
}
else
{
moveItem( dest, origin );
}
moveItem( dest, origin );setCurrentItem( origin );
}
setCurrentItem( origin );
setCursor( QCursor( Qt::SizeVerCursor ) );
}
else if ( action == QgsLegendItem::INSERT )
{
setCursor( QCursor( Qt::PointingHandCursor ) );
if ( origin->parent() != dest )
{
insertItem( origin, dest );
}
setCurrentItem( origin );
setCursor( QCursor( Qt::PointingHandCursor ) );
}
else
else //no action
{
QgsDebugMsg( "mouseMoveEvent::NO_ACTION" );

Expand Down

0 comments on commit 89b5de5

Please sign in to comment.