Revision: 4056
Author:   [email protected]
Date:     Tue Apr 16 07:47:30 2013
Log: Fixed bug 3075 : changes made to solve the issue of straighten the relationship line when the parent faces left/right ( e.g two tables are vertically overlap).
http://code.google.com/p/power-architect/source/detail?r=4056

Modified:
 /trunk/src/main/java/ca/sqlpower/architect/swingui/BasicRelationshipUI.java

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/BasicRelationshipUI.java Wed Nov 24 12:21:21 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/BasicRelationshipUI.java Tue Apr 16 07:47:30 2013
@@ -1141,9 +1141,21 @@

             // actual work to adjust the connection point
             if (isPkConnectionPoint) {
- relationship.setPkConnection(((double)lastValidPoint.getX() / relationship.getPkTable().getWidth()));
-            } else {
- relationship.setFkConnection(((double)lastValidPoint.getX() / relationship.getFkTable().getWidth())); + if((relationship.getOrientation() & Relationship.PARENT_FACES_LEFT) > 0 || + (relationship.getOrientation() & Relationship.PARENT_FACES_RIGHT )> 0 ){ + relationship.setPkConnection(((double)lastValidPoint.getY() / relationship.getPkTable().getHeight()));
+                }
+                else{
+ relationship.setPkConnection(((double)lastValidPoint.getX() / relationship.getPkTable().getWidth()));
+                }
+            }else{
+ if((relationship.getOrientation() & Relationship.PARENT_FACES_LEFT) > 0 || + (relationship.getOrientation() & Relationship.PARENT_FACES_RIGHT ) > 0 ){ + relationship.setFkConnection(((double)lastValidPoint.getY() / relationship.getFkTable().getHeight()));
+                }
+                else {
+ relationship.setFkConnection(((double)lastValidPoint.getX() / relationship.getFkTable().getWidth()));
+                }
             }

             // sets up for the next connection point, assumes

--

--- You received this message because you are subscribed to the Google Groups "Architect Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to