Skip to content
Permalink
Browse files

Fix for ticket 1745 (QGis crashes dragging a Legend Layer File over a…

… Legend Layer File Group)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11206 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jul 29, 2009
1 parent a52d3c8 commit 89b5de5bb6ef2d52c9b6eb565205789422d73cb6
Showing with 13 additions and 13 deletions.
  1. +13 −13 src/app/legend/qgslegend.cpp
@@ -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" );

0 comments on commit 89b5de5

Please sign in to comment.
You can’t perform that action at this time.