From e03281a9ae108d0d32ced489abde66be941515d8 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 29 Dec 2019 19:40:18 +0000 Subject: [PATCH] Allow exclusive-or selections on OSX. --- pcbnew/tools/selection_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index e165e61a3b..0ef5b3d6d3 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -192,12 +192,18 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) bool dragAlwaysSelects = getEditFrame()->GetDragSelects(); m_additive = m_subtractive = m_exclusive_or = false; + // OSX uses CTRL for context menu, and SHIFT is exclusive-or +#ifdef __WXOSX_MAC__ + if( evt->Modifier( MD_SHIFT ) ) + m_exclusive_or = true; +#else if( evt->Modifier( MD_SHIFT ) && evt->Modifier( MD_CTRL ) ) m_subtractive = true; else if( evt->Modifier( MD_SHIFT ) ) m_additive = true; else if( evt->Modifier( MD_CTRL ) ) m_exclusive_or = true; +#endif // Is the user requesting that the selection list include all possible // items without removing less likely selection candidates