Revision: 3365
Author: [email protected]
Date: Fri Mar  5 15:12:34 2010
Log: Corrected the DataMoverPanel to look at the correct ancestor when deciding where to place a table.
http://code.google.com/p/power-architect/source/detail?r=3365

Modified:
 /trunk/src/ca/sqlpower/architect/swingui/DataMoverPanel.java

=======================================
--- /trunk/src/ca/sqlpower/architect/swingui/DataMoverPanel.java Thu Feb 25 09:46:15 2010 +++ /trunk/src/ca/sqlpower/architect/swingui/DataMoverPanel.java Fri Mar 5 15:12:34 2010
@@ -259,13 +259,12 @@
         String destCatalogName = null;
         String destSchemaName = null;
         String destTableName = sourceTable.getName();
-        SQLObject tmpSqlObj = destObject;
- List<SQLObject> ancestorList = SQLObjectUtils.ancestorList(tmpSqlObj); + List<SQLObject> ancestorList = SQLObjectUtils.ancestorList(destObject);
         for (SQLObject ancestor : ancestorList) {
// walk up the ancestors and set table, catalog, and schema name as appropriate - if (tmpSqlObj instanceof SQLTable) destTableName = ancestor.getName(); - if (tmpSqlObj instanceof SQLCatalog) destCatalogName = ancestor.getName(); - if (tmpSqlObj instanceof SQLSchema) destSchemaName = ancestor.getName(); + if (ancestor instanceof SQLTable) destTableName = ancestor.getName(); + if (ancestor instanceof SQLCatalog) destCatalogName = ancestor.getName(); + if (ancestor instanceof SQLSchema) destSchemaName = ancestor.getName();
         }

         boolean needToCreate = false;

Reply via email to