Skip to content

Commit

Permalink
Fix for quick left-then-right clicks incorrectly registering as doubl…
Browse files Browse the repository at this point in the history
…e left on Mac
  • Loading branch information
dakcarto committed Nov 21, 2012
1 parent e029bc7 commit 52e6c50
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -679,7 +679,17 @@ void QgsLegend::mouseReleaseEvent( QMouseEvent * e )

void QgsLegend::mouseDoubleClickEvent( QMouseEvent *e )
{
#ifdef Q_WS_MAC
// fix for when quick left-then-right clicks (when legend is out of focus)
// register as left double click: show contextual menu as user intended
if ( e->button() == Qt::RightButton )
{
mousePressEvent( e );
return;
}
#else
Q_UNUSED( e );
#endif

QSettings settings;
switch ( settings.value( "/qgis/legendDoubleClickAction", 0 ).toInt() )
Expand Down

0 comments on commit 52e6c50

Please sign in to comment.