Revision: 3694
Author: [email protected]
Date: Thu Jul 8 13:04:18 2010
Log: Setting the logical name of a column will now update the physical name
of the column if they match or the physical name is missing.
The physical name must be set first in the editor panel for the magic of
setting the logical name to work.
http://code.google.com/p/power-architect/source/detail?r=3694
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/ColumnEditPanel.java
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/ColumnEditPanel.java
Fri Jun 11 14:23:35 2010
+++ /trunk/src/main/java/ca/sqlpower/architect/swingui/ColumnEditPanel.java
Thu Jul 8 13:04:18 2010
@@ -824,6 +824,9 @@
compoundEditRoot.begin(Messages.getString("ColumnEditPanel.compoundEditName"));
//$NON-NLS-1$
for (SQLColumn column : columns) {
+ if (componentEnabledMap.get(colPhysicalName).isSelected())
{
+ column.setPhysicalName(colPhysicalName.getText());
+ }
if (componentEnabledMap.get(colLogicalName).isSelected()) {
if (colLogicalName.getText().trim().length() == 0) {
errors.add(Messages.getString("ColumnEditPanel.columnNameRequired"));
//$NON-NLS-1$
@@ -831,9 +834,6 @@
column.setName(colLogicalName.getText());
}
}
- if (componentEnabledMap.get(colPhysicalName).isSelected())
{
- column.setPhysicalName(colPhysicalName.getText());
- }
if (componentEnabledMap.get(colType).isSelected()) {
// Set upstream type on column
UserDefinedSQLType upstreamType = (UserDefinedSQLType)
colType.getLastSelectedPathComponent();