Revision 43408 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/DefaultFeatureStore.java

View differences:

DefaultFeatureStore.java
1380 1380
    synchronized public void cancelEditing() throws DataException {
1381 1381
        spatialManager.cancelModifies();
1382 1382
        try {
1383
            checkInEditingMode();
1383
            switch (mode) {
1384
            case MODE_QUERY:
1385
                throw new NeedEditingModeException(this.getName());
1384 1386

  
1385
            boolean clearSelection = this.hasStrongChanges;
1386
            if (this.selection instanceof FeatureReferenceSelection) {
1387
                clearSelection = this.hasInserts;
1388
            }
1389
            notifyChange(FeatureStoreNotification.BEFORE_CANCELEDITING);
1390
            exitEditingMode();
1391
            if (clearSelection) {
1387
            case MODE_APPEND:
1388
                notifyChange(FeatureStoreNotification.BEFORE_CANCELEDITING);
1389
                provider.abortAppend();
1390
                exitEditingMode();
1392 1391
                ((FeatureSelection) this.getSelection()).deselectAll();
1392
                updateIndexes();
1393
                notifyChange(FeatureStoreNotification.AFTER_CANCELEDITING);   
1394

  
1395
            case MODE_FULLEDIT:
1396
                boolean clearSelection = this.hasStrongChanges;
1397
                if (this.selection instanceof FeatureReferenceSelection) {
1398
                    clearSelection = this.hasInserts;
1399
                }
1400
                notifyChange(FeatureStoreNotification.BEFORE_CANCELEDITING);
1401
                exitEditingMode();
1402
                if (clearSelection) {
1403
                    ((FeatureSelection) this.getSelection()).deselectAll();
1404
                }
1405
                updateIndexes();
1406
                notifyChange(FeatureStoreNotification.AFTER_CANCELEDITING);   
1393 1407
            }
1394
            updateIndexes();
1395
            notifyChange(FeatureStoreNotification.AFTER_CANCELEDITING);
1396 1408
        } catch (Exception e) {
1397 1409
            throw new StoreCancelEditingException(e, this.getName());
1398 1410
        }

Also available in: Unified diff