From fc316803e9c39d809655fc330e5cb6b3d8fcdadb Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Wed, 23 Apr 2014 15:46:45 +0400 Subject: [PATCH] IDEA-124290 --- .../designer/designSurface/tools/SelectionTracker.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/ui-designer-core/src/com/intellij/designer/designSurface/tools/SelectionTracker.java b/plugins/ui-designer-core/src/com/intellij/designer/designSurface/tools/SelectionTracker.java index a8b35b1f4b68..da1590248439 100644 --- a/plugins/ui-designer-core/src/com/intellij/designer/designSurface/tools/SelectionTracker.java +++ b/plugins/ui-designer-core/src/com/intellij/designer/designSurface/tools/SelectionTracker.java @@ -72,6 +72,14 @@ public class SelectionTracker extends TargetingTool { @Override protected void handleButtonUp(int button) { if (myState == STATE_DRAG) { + // Control clicking on a Mac is used to simulate right clicks: do not treat this as + // a selection reset (since it makes it impossible to pull up the context menu with + // a multi-selection: the right click action causes the selection to be replaced + // with the single item under the mouse) + if (SystemInfo.isMac && myInputEvent != null && myInputEvent.isControlDown()) { + return; + } + performSelection(); myState = STATE_NONE; }