Skip to content
Permalink
Browse files
keep layer selection on legend right click
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14217 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 10, 2010
1 parent b430cf9 commit 0d6641d0e81cfd337c6b154bd4ed5b7e45ee69c3
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/legend/qgslegend.cpp
@@ -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 0d6641d

Please sign in to comment.