Skip to content

Commit c07fd4a

Browse files
author
jef
committedSep 20, 2010
fix #3021
git-svn-id: http://svn.osgeo.org/qgis/trunk@14266 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 514d797 commit c07fd4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/app/legend/qgslegend.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,12 @@ void QgsLegend::mousePressEvent( QMouseEvent * e )
218218
else if ( e->button() == Qt::RightButton )
219219
{
220220
QTreeWidgetItem* item = itemAt( e->pos() );
221-
if ( item == currentItem() )
221+
if ( !item || item == currentItem() )
222+
{
223+
if ( !item )
224+
setCurrentItem( 0 );
222225
handleRightClickEvent( item, e->globalPos() );
226+
}
223227
}
224228
QTreeWidget::mousePressEvent( e );
225229
} // contentsMousePressEvent

0 commit comments

Comments
 (0)
Please sign in to comment.