Revision 44190 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java
DefaultEditableFeatureType.java | ||
---|---|---|
159 | 159 |
return this.add(name, type, true); |
160 | 160 |
} |
161 | 161 |
|
162 |
private EditableFeatureAttributeDescriptor add(String name, int type, boolean updateHasStrongChanges) {
|
|
163 |
DefaultEditableFeatureAttributeDescriptor attr = new DefaultEditableFeatureAttributeDescriptor(this); |
|
162 |
private EditableFeatureAttributeDescriptor add(String name, int type, boolean strongChanges) {
|
|
163 |
DefaultEditableFeatureAttributeDescriptor attr = new DefaultEditableFeatureAttributeDescriptor(this, strongChanges);
|
|
164 | 164 |
Iterator iter = this.iterator(); |
165 | 165 |
while (iter.hasNext()) { |
166 | 166 |
EditableFeatureAttributeDescriptor descriptor = (EditableFeatureAttributeDescriptor) iter.next(); |
... | ... | |
197 | 197 |
} |
198 | 198 |
attr.setDataType(type); |
199 | 199 |
attr.setIndex(this.size()); |
200 |
|
|
200 | 201 |
super.add(attr); |
201 |
if (!hasStrongChanges && updateHasStrongChanges) { |
|
202 |
hasStrongChanges = true; |
|
203 |
} |
|
204 | 202 |
this.pk = null; |
205 | 203 |
return attr; |
206 | 204 |
} |
... | ... | |
252 | 250 |
if (attr == null) { |
253 | 251 |
return null; |
254 | 252 |
} |
255 |
if (attr.getEvaluator() == null) {
|
|
253 |
if ( !attr.isComputed() ) {
|
|
256 | 254 |
hasStrongChanges = true; |
257 | 255 |
} |
258 | 256 |
super.remove(attr); |
... | ... | |
263 | 261 |
|
264 | 262 |
@Override |
265 | 263 |
public boolean remove(EditableFeatureAttributeDescriptor attribute) { |
266 |
if (attribute.getEvaluator() != null) {
|
|
264 |
if ( !attribute.isComputed() ) {
|
|
267 | 265 |
hasStrongChanges = true; |
268 | 266 |
} |
269 | 267 |
if (!super.remove(attribute)) { |
Also available in: Unified diff