Skip to content
Permalink
Browse files

don't allow dropping layers into legend classes

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14420 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Oct 20, 2010
1 parent 2195cce commit 493aff4000941baab9d1330c43d8ce9af863da21
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/app/legend/qgslegend.cpp
@@ -321,9 +321,10 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
updateLineWidget();
scrollToItem( item );

mDropTarget = 0;

if ( item )
{
mDropTarget = item;
showItem( "moveMoveEvent" , item );

QgsLegendItem *litem = dynamic_cast<QgsLegendGroup *>( item );
@@ -341,6 +342,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
showLine( line_y, line_left );
setCursor( QCursor( Qt::SizeVerCursor ) );

mDropTarget = item;
mDropAction = BEFORE;
}
else // below center of item
@@ -354,6 +356,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
showLine( line_y, line_left );
setCursor( QCursor( Qt::SizeVerCursor ) );

mDropTarget = item;
mDropAction = INSERT;
}
else
@@ -362,6 +365,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
showLine( line_y, line_left );
setCursor( QCursor( Qt::SizeVerCursor ) );

mDropTarget = item;
mDropAction = AFTER;
}
}
@@ -389,7 +393,6 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
else
{
QgsDebugMsg( "No item here" );
mDropTarget = NULL;
setCursor( QCursor( Qt::ForbiddenCursor ) );
}
}

0 comments on commit 493aff4

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