Revision: 4065
Author: [email protected]
Date: Thu Feb 12 20:49:09 2015 UTC
Log: Improved message, In case if table is selected to delete, then
all children of selected table also deleted. related to bug id#3146
https://code.google.com/p/power-architect/source/detail?r=4065
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java
Thu Apr 21 16:02:00 2011 UTC
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/action/DeleteSelectedAction.java
Thu Feb 12 20:49:09 2015 UTC
@@ -104,6 +104,18 @@
cCount++;
} else if (item instanceof SQLTable) {
tCount++;
+ // to improve message, In case if table is selected to
delete, then all children of selected table also deleted
+ for (SPObject child : ((SQLTable)item).getChildren()) {
+ if (!deleteItems.contains(child)) {
+ if (child instanceof SQLColumn ) {
+ cCount++;
+ } else if (child instanceof SQLRelationship) {
+ rCount++;
+ } else if (child instanceof SQLIndex) {
+ iCount++;
+ }
+ }
+ }
} else if (item instanceof SQLRelationship) {
rCount++;
} else if (item instanceof SQLIndex) {
--
---
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/d/optout.