Skip to content

Commit 52e6c50

Browse files
committed
Fix for quick left-then-right clicks incorrectly registering as double left on Mac
1 parent e029bc7 commit 52e6c50

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/app/legend/qgslegend.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,17 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )
679679

680680
void QgsLegend::mouseDoubleClickEvent( QMouseEvent *e )
681681
{
682+
#ifdef Q_WS_MAC
683+
// fix for when quick left-then-right clicks (when legend is out of focus)
684+
// register as left double click: show contextual menu as user intended
685+
if ( e->button() == Qt::RightButton )
686+
{
687+
mousePressEvent( e );
688+
return;
689+
}
690+
#else
682691
Q_UNUSED( e );
692+
#endif
683693

684694
QSettings settings;
685695
switch ( settings.value( "/qgis/legendDoubleClickAction", 0 ).toInt() )

0 commit comments

Comments
 (0)