Revision 24759 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/UndoTableExtension.java

View differences:

UndoTableExtension.java
40 40
 */
41 41
package com.iver.cit.gvsig;
42 42

  
43
import org.gvsig.fmap.data.ReadException;
44
import org.gvsig.fmap.data.feature.FeatureStore;
43
import org.gvsig.fmap.dal.exception.DataException;
44
import org.gvsig.fmap.dal.feature.FeatureStore;
45 45

  
46 46
import com.iver.andami.PluginServices;
47 47
import com.iver.andami.messages.NotificationManager;
......
79 79
		if (s.compareTo("UNDO") == 0) {
80 80
			if (tabla.isEditing()){
81 81
				FeatureStore fs=tabla.getModel().getModel();
82
				fs.undo();
83
				fs.getSelection().clear();
82
				try {
83
					fs.undo();
84
					fs.getFeatureSelection().deselectAll();
85
				} catch (DataException e) {
86
					NotificationManager.addError(e);
87
				}
88

  
84 89
			}
85 90
			tabla.getModel().setModified(true);
86 91
		}
......
96 101
		//for (int i=0;i<layers.getLayersCount();i++){
97 102
			if (tabla.getModel().getModel() instanceof FeatureStore && tabla.isEditing()){
98 103
				FeatureStore fs = tabla.getModel().getModel();
99
				if (fs==null)return false;
104
				if (fs==null) {
105
					return false;
106
				}
100 107
				return fs.getCommandsRecord().moreUndoCommands();
101 108
			}
102 109

  

Also available in: Unified diff