Skip to content

Commit

Permalink
fix #3021
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14266 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 20, 2010
1 parent f6237a7 commit 8827efc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/legend/qgslegend.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 8827efc

Please sign in to comment.