Author: [EMAIL PROTECTED]
Date: Fri Dec  5 08:53:36 2008
New Revision: 2865

Modified:
   trunk/src/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java

Log:
The table.addColumn call seems to be completely unnecessary, and it may even be harmful. In any case, the PK index deletion functionality still works without it, and I have not noticed any harmful side-effects.

Modified: trunk/src/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java Fri Dec 5 08:53:36 2008
@@ -135,7 +135,6 @@
                 try {
                     if (o instanceof SQLIndex) {
                         SQLIndex index = (SQLIndex) o;
-                        SQLTable table = index.getParentTable();
                         o.getParent().removeChild(o);
                         List<SQLColumn> cols = new ArrayList<SQLColumn>();
                         for (Column col : index.getChildren()) {
@@ -143,7 +142,6 @@
                         }
                         for (SQLColumn col : cols) {
                             col.setPrimaryKeySeq(null);
-                            table.addColumn(col);
                         }
                     } else {
                         o.getParent().removeChild(o);

Reply via email to