We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 514d797 commit c07fd4aCopy full SHA for c07fd4a
src/app/legend/qgslegend.cpp
@@ -218,8 +218,12 @@ void QgsLegend::mousePressEvent( QMouseEvent * e )
218
else if ( e->button() == Qt::RightButton )
219
{
220
QTreeWidgetItem* item = itemAt( e->pos() );
221
- if ( item == currentItem() )
+ if ( !item || item == currentItem() )
222
+ {
223
+ if ( !item )
224
+ setCurrentItem( 0 );
225
handleRightClickEvent( item, e->globalPos() );
226
+ }
227
}
228
QTreeWidget::mousePressEvent( e );
229
} // contentsMousePressEvent
0 commit comments