Skip to content
Permalink
Browse files
keep layer selection on legend right click
git-svn-id: http://svn.osgeo.org/qgis/trunk@14217 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 10, 2010
1 parent 53447de commit 6428982
Showing 1 changed file with 3 additions and 2 deletions.
@@ -218,8 +218,8 @@ void QgsLegend::mousePressEvent( QMouseEvent * e )
else if ( e->button() == Qt::RightButton )
{
QTreeWidgetItem* item = itemAt( e->pos() );
setCurrentItem( item );
handleRightClickEvent( item, e->globalPos() );
if ( item == currentItem() )
handleRightClickEvent( item, e->globalPos() );
}
QTreeWidget::mousePressEvent( e );
} // contentsMousePressEvent
@@ -622,6 +622,7 @@ bool QgsLegend::setCurrentLayer( QgsMapLayer *layer )
return false;

setCurrentItem( ll );
clearSelection();
return true;
}

0 comments on commit 6428982

Please sign in to comment.