Skip to content
Permalink
Browse files
yalb (yet another legend bugfix)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4935 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 1, 2006
1 parent 1900732 commit a91787b67d01c02726c80ab7201012a7961c4e47
Showing with 11 additions and 5 deletions.
  1. +0 −1 src/legend/qgslegend.cpp
  2. +11 −4 src/legend/qgslegendlayer.cpp
@@ -161,7 +161,6 @@ void QgsLegend::mouseMoveEvent(QMouseEvent * e)

// remember item we've pressed as the one being moved
// and where it was originally
//QTreeWidgetItem* item = itemAt(contentsToViewport(mLastPressPos));
QTreeWidgetItem* item = itemAt(mLastPressPos);
if(item)
{
@@ -78,12 +78,12 @@ QgsLegendItem::DRAG_ACTION QgsLegendLayer::accept(LEGEND_ITEM_TYPE type)
{
if ( type == LEGEND_LAYER || type == LEGEND_GROUP)
{
return REORDER;
return REORDER;
}
else
{
{
return NO_ACTION;
}
}
}

QgsLegendItem::DRAG_ACTION QgsLegendLayer::accept(const QgsLegendItem* li) const
@@ -94,7 +94,14 @@ QgsLegendItem::DRAG_ACTION QgsLegendLayer::accept(const QgsLegendItem* li) const
if(li && li != this)
{
LEGEND_ITEM_TYPE type = li->type();
if ( type == LEGEND_LAYER || type == LEGEND_GROUP)
if ( type == LEGEND_LAYER)
{
if(parent() == li->parent())
{
return REORDER;
}
}
else if(type == LEGEND_GROUP)
{
return REORDER;
}

0 comments on commit a91787b

Please sign in to comment.