git-svn-id: http://svn.osgeo.org/qgis/trunk@14266 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2010-09-20 18:59:10 +00:00
parent 514d79710d
commit c07fd4a1db

View File

@ -218,8 +218,12 @@ void QgsLegend::mousePressEvent( QMouseEvent * e )
else if ( e->button() == Qt::RightButton )
{
QTreeWidgetItem* item = itemAt( e->pos() );
if ( item == currentItem() )
if ( !item || item == currentItem() )
{
if ( !item )
setCurrentItem( 0 );
handleRightClickEvent( item, e->globalPos() );
}
}
QTreeWidget::mousePressEvent( e );
} // contentsMousePressEvent