# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\Users\jhavlin\core-main # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: api.visual/src/org/netbeans/modules/visual/action/AlignWithSupport.java --- api.visual/src/org/netbeans/modules/visual/action/AlignWithSupport.java Base (BASE) +++ api.visual/src/org/netbeans/modules/visual/action/AlignWithSupport.java Locally Modified (Based On LOCAL) @@ -83,10 +83,12 @@ int b1 = sceneWidgetBounds.x; int b2 = sceneWidgetBounds.x + sceneWidgetBounds.width; + int b3 = sceneWidgetBounds.x + (sceneWidgetBounds.width/2); for (Rectangle rectangle : regions) { int a1 = rectangle.x; int a2 = a1 + rectangle.width; + int a3 = a1 +(rectangle.width/2); int d; boolean snapNow = false; @@ -125,6 +127,14 @@ } } + d = Math.abs(a3 - b3); + if ((snap && d < dx) || (!snap && d < GRAVITY)) { + snap = snapNow = true; + xs = a3 - (b3 - b1); + x = a3; + dx = d; + } + if (snapNow) { y1 = rectangle.y; y2 = rectangle.y + rectangle.height; @@ -151,10 +161,12 @@ int b1 = sceneWidgetBounds.y; int b2 = sceneWidgetBounds.y + sceneWidgetBounds.height; + int b3 = sceneWidgetBounds.y + (sceneWidgetBounds.height/2); for (Rectangle rectangle : regions) { int a1 = rectangle.y; int a2 = a1 + rectangle.height; + int a3 = a1 + (rectangle.height/2); int d; boolean snapNow = false; @@ -189,6 +201,14 @@ dy = d; } + d = Math.abs(a3 - b3); + if ((snap && d < dy) || (!snap && d < GRAVITY)) { + snap = snapNow = true; + ys = a3 - (b3 - b1); + y = a3; + dy = d; + } + if (snapNow) { x1 = rectangle.x; x2 = rectangle.x + rectangle.width;