Bug 112799 - Shapes do not snap to grid when dragged over other shapes
Summary: Shapes do not snap to grid when dragged over other shapes
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.0   Edit
Assignee: Mohammed Mostafa CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2005-10-17 11:07 EDT by Steven R. Shaw CLA
Modified: 2010-07-19 12:27 EDT (History)
3 users (show)

See Also:


Attachments
Patch for snapping to grid when over other shapes (3.47 KB, patch)
2006-10-17 11:06 EDT, Tom Macdougall CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven R. Shaw CLA 2005-10-17 11:07:52 EDT
TEST CASE
1.  Create a logic diagram and add two geometric shapes (A & B) to the 
canvas.  Make the shapes ~ 3" x 3" in size.
2.  Drag B around, note how it snaps to the grid.
3.  Drag B over A

RESULT:
The snap to grid feature stops working and B can be positioned off of the grid.
Comment 1 Steven R. Shaw CLA 2006-01-09 17:06:58 EST
Isn't this a GEF issue?
Comment 2 David Modjeska CLA 2006-05-31 11:10:35 EDT
The snapping feature stops working specifically when the mouse pointer is over the underlying object.
Comment 3 Tom Macdougall CLA 2006-10-17 11:06:47 EDT
Created attachment 52129 [details]
Patch for snapping to grid when over other shapes

There are two issues. 
1) The NonResizableEditPolicyEx that needs to understand the drop requests. 
2) The DragEditPartsTrackerEx is setting the target editpart to be the editpart belonging to the shape that you are moving. In GEF, it appears that the LogicDiagramEditPart is returned. I forced the DiagramEditPart to be returned for GMF as well. I don't believe this to be a viable solution but a proof of concept and guide to other possible solutions.
Comment 4 Anthony Hunter CLA 2006-11-06 11:19:20 EST
Marking as a usability issue.
Not a critical issue for the maintenance release.
Comment 5 Anthony Hunter CLA 2006-11-28 16:55:21 EST
Mohammed, can you review this patch for 2.0 M4?
Comment 6 Mohammed Mostafa CLA 2007-01-05 11:42:01 EST
(In reply to comment #5)
> Mohammed, can you review this patch for 2.0 M4?

Talked to TOM, The attached patch is not intended to be submitted 

we are considering other possible fix
Comment 7 Mohammed Mostafa CLA 2007-01-16 10:03:58 EST
Refactored the snape to grid support, and fixed the problem
Comment 8 Richard Gronback CLA 2008-08-13 13:10:58 EDT
[target cleanup] 2.0 M5 was the original target milestone for this bug
Comment 9 Eclipse Webmaster CLA 2010-07-19 12:27:08 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug