Revision 45785

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/editing/memory/SpatialManager.java
120 120
        if (noSpatialData) {
121 121
            return;
122 122
        }
123
            try {
124
            	if (featureIndex != null) {
125
            		featureIndex.delete(oldFeature);
126
            	}
127
                feaOperation.add(new FeatureOperation(((DefaultFeature) oldFeature)
128
                        .getReference(), FeatureOperation.DELETE));
129
            	if (featureIndex != null) {
130
            		featureIndex.insert(feature);
131
            	}
132
                feaOperation.add(new FeatureOperation(((DefaultFeature) feature)
133
                        .getReference(), FeatureOperation.INSERT));
134
            } catch (DataException e) {
135
                throw new RuntimeException("Exception updating feature: "
123
        try {
124
            if (oldFeature != null) {
125
                if (featureIndex != null) {
126
                    featureIndex.delete(oldFeature);
127
                }
128
                final FeatureReference reference = oldFeature.getReference();
129
                feaOperation.add(new FeatureOperation(reference, FeatureOperation.DELETE));
130
            }
131
            if (featureIndex != null) {
132
                featureIndex.insert(feature);
133
            }
134
            feaOperation.add(
135
                    new FeatureOperation(
136
                            feature.getReference(),
137
                            FeatureOperation.INSERT
138
                    )
139
            );
140
        } catch (DataException e) {
141
            throw new RuntimeException("Exception updating feature: "
136 142
                    + feature, e);
137
            }
138
            // } else {
139
            // fullEnvelope.add(feature.getDefaultEnvelope());
143
        }
144
        // } else {
145
        // fullEnvelope.add(feature.getDefaultEnvelope());
140 146
        isFullExtentDirty = true;
141 147
    }
142 148

  
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/DefaultFeature.java
1266 1266
    }
1267 1267

  
1268 1268
    /**
1269
     * It is a new feature that has already been inserted into the store but has not yet been saved to disk
1270
     * 
1269 1271
     * @return the inserted
1270 1272
     */
1271 1273
    public boolean isInserted() {
......
1273 1275
    }
1274 1276

  
1275 1277
    /**
1278
     * If true, marks the feature as already inserted in the vault but has not yet been saved to disk
1279
     * 
1276 1280
     * @param inserted the inserted to set
1277 1281
     */
1278 1282
    public void setInserted(boolean inserted) {

Also available in: Unified diff