Revision: 3429
Author: [email protected]
Date: Mon Apr 5 12:45:49 2010
Log: NEW - bug 2736: Deleting a relationship causes an error on other
clients
http://trillian.sqlpower.ca/bugzilla/show_bug.cgi?id=2736
You can now delete a relationship from other clients without error. The
undo and redo of relationships while using
multiple clients has also been fixed.
http://code.google.com/p/power-architect/source/detail?r=3429
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPen.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenContentPane.java
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPen.java Mon
Apr 5 08:45:43 2010
+++ /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPen.java Mon
Apr 5 12:45:49 2010
@@ -1708,13 +1708,13 @@
*/
public void childAdded(SPChildEvent e) {
logger.debug("SQLObject children got inserted: "+e);
//$NON-NLS-1$
+ SPObject child = e.getChild();
+ addHierarchyListeners(child);
if (!contentPane.isMagicEnabled() || !e.getSource().isMagicEnabled())
return;
childAdded = true;
boolean fireEvent = false;
- SPObject child = e.getChild();
- addHierarchyListeners(child);
try {
if (child instanceof SQLTable
|| (child instanceof SQLRelationship
@@ -1748,12 +1748,12 @@
*/
public void childRemoved(SPChildEvent e) {
logger.debug("SQLObject children got removed: "+e);
//$NON-NLS-1$
+ SPObject child = e.getChild();
+ removeHierarchyListeners(child);
if (!contentPane.isMagicEnabled() || !e.getSource().isMagicEnabled())
return;
boolean foundRemovedComponent = false;
- SPObject child = e.getChild();
- removeHierarchyListeners(child);
if (child instanceof SQLTable) {
for (int j = 0; j < contentPane.getComponentCount(); j++) {
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenContentPane.java
Mon Apr 5 08:45:43 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenContentPane.java
Mon Apr 5 12:45:49 2010
@@ -221,7 +221,7 @@
else if (relations.contains(c)) targetList = relations;
else return false;
- int i = targetList.indexOf(c);
+ int i = getChildren().indexOf(c);
targetList.remove(c);
fireChildRemoved(c.getClass(), c, i);
return true;
--
To unsubscribe, reply using "remove me" as the subject.