mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
fix #3021
git-svn-id: http://svn.osgeo.org/qgis/trunk@14266 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
514d79710d
commit
c07fd4a1db
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user