Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313311 - [cocoa, gef] CTRL key modifier for ignoring snap does not work on Cocoa
Summary: [cocoa, gef] CTRL key modifier for ignoring snap does not work on Cocoa
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.6.0 (Helios) RC2   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 05:53 EDT by Justin Dolezy CLA
Modified: 2010-05-25 11:45 EDT (History)
1 user (show)

See Also:


Attachments
Patch for correct Mac OS X detection (1023 bytes, patch)
2010-05-18 15:23 EDT, Justin Dolezy CLA
ahunter.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Dolezy CLA 2010-05-18 05:53:24 EDT
Build Identifier: I20100312-1448

org.eclipse.gef.tools.AbstractTool has the following code:

static {
	if (SWT.getPlatform().equals("carbon"))//$NON-NLS-1$
		MODIFIER_NO_SNAPPING = SWT.CTRL;
	else
		MODIFIER_NO_SNAPPING = SWT.ALT;
}

The platform check must change to encompass Cocoa - will supply patch changing the line to:

> if (Platform.OS_MACOSX.equals(Platform.getOS())) {


Reproducible: Always

Steps to Reproduce:
1. open a GEF editor (on Cocoa) where a snap grid can be enabled and enable it
2. create an object
3. start dragging the object - it will snap to the grid regardless of whether the CTRL key is held down or now (works fine on Carbon)
Comment 1 Justin Dolezy CLA 2010-05-18 15:23:58 EDT
Created attachment 169003 [details]
Patch for correct Mac OS X detection
Comment 2 Anthony Hunter CLA 2010-05-25 11:45:42 EDT
Committed to HEAD for RC2.