Revision 44582

View differences:

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
65 65

  
66 66
    protected DefaultEditableFeatureType(DefaultEditableFeatureType other) {
67 67
        super(other);
68
        this.hasStrongChanges = other.hasStrongChanges;
68 69
        this.source = (DefaultFeatureType) other.getSource();
69 70
    }
70 71

  
71 72
    protected DefaultEditableFeatureType(DefaultFeatureType other) {
72 73
        super(other);
73 74
        this.source = other;
75
        this.fixAll();
74 76
    }
75 77

  
76 78
    @Override
......
296 298
    @Override
297 299
    protected void fixAll() {
298 300
        super.fixAll();
301
        for (FeatureAttributeDescriptor attr : this) {
302
            if (attr instanceof DefaultEditableFeatureAttributeDescriptor) {
303
                DefaultEditableFeatureAttributeDescriptor attr2 = (DefaultEditableFeatureAttributeDescriptor) attr;
304
                if (attr2.hasStrongChanges()) {
305
                    this.hasStrongChanges = true;
306
                    break;
307
                }
308
            }
309
        }
299 310
    }
300 311

  
301 312
    public void checkIntegrity() throws DataListException {
......
384 395
    protected void setAllowAutomaticValues(boolean value) {
385 396
        this.allowAtomaticValues = value;
386 397
    }
398
    
399
    @Override
400
    public void copyFrom(FeatureType other) {
401
        super.copyFrom(other);
402
        if (other instanceof EditableFeatureType) {
403
            DefaultEditableFeatureType other2 = (DefaultEditableFeatureType) other;
404
            this.hasStrongChanges = other2.hasStrongChanges;
405
            this.source = (DefaultFeatureType) other2.getSource();
406
        } else {
407
            this.hasStrongChanges = false;
408
            this.source = (DefaultFeatureType) other;
409
        }
410
    }
387 411

  
388 412
}
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureTypePanel.java
429 429
            type = (EditableFeatureType) this.featureType.getCopy();
430 430
        } else {
431 431
            type.removeAll();
432
            type.addAll(this.featureType);
432
            type.copyFrom(this.featureType);
433 433
        }
434 434
        type.setLabel(
435 435
            StringUtils.defaultIfBlank(this.txtLabel.getText(), null)

Also available in: Unified diff