Revision 43408

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/ExporrtoJDBCService.java
352 352
            }
353 353
            featureSet.dispose();
354 354
            if (target != null) {
355
                if( target.isAppending() ) {
356
                    try {
357
                        target.cancelEditing();
358
                    } catch(Exception ex) {
359
                        // Do nothing
360
                    }
361
                }
355 362
                target.dispose();
356 363
            }
357 364
            this.taskStatus.terminate();
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/JDBCStoreProviderBase.java
517 517
    }
518 518

  
519 519
    @Override
520
    public void abortAppend() throws DataException {
521
        this.getAppendOperation().abort();
522
    }
523
    
524
    @Override
520 525
    public void beginAppend() throws DataException {
521 526
        this.getAppendOperation().begin();
522 527
    }
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
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