Revision: 3856
Author: mo.jeff
Date: Mon Aug 9 15:06:59 2010
Log: Fixed an issue where creating multiple columns that referred to the
same type would create the snapshot, but not increment the snapshot usage
count. This was because there was a condition that was intended to prevent
the echo when setting a upstream type to a snapshot, but also did not
differentiate between that and simply setting a column to use an existing
snapshot type
http://code.google.com/p/power-architect/source/detail?r=3856
Modified:
/trunk/src/main/java/ca/sqlpower/architect/SPObjectSnapshotHierarchyListener.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/SPObjectSnapshotHierarchyListener.java
Mon Aug 9 09:43:24 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/SPObjectSnapshotHierarchyListener.java
Mon Aug 9 15:06:59 2010
@@ -144,7 +144,8 @@
&& e.getPropertyName().equals("upstreamType")) {
if (upstreamTypeChangeEvent == null &&
!(e.getNewValue() instanceof UserDefinedSQLType &&
- ((UserDefinedSQLType)e.getNewValue()).getParent() ==
session.getWorkspace().getSnapshotCollection())) {
+ ((UserDefinedSQLType)e.getNewValue()).getParent() ==
session.getWorkspace().getSnapshotCollection() &&
+ settingSnapshot)) {
logger.debug("Got a property change event for
upstreamType!");
upstreamTypeChangeEvent = e;
} else {