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@11206 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jul 29, 2009
1 parent a7eaaba commit 79aa90be10d20a501dc0a18ee55c5c24ebb59b68
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 79aa90b

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