Revision 38564 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/RedoViewExtension.java

View differences:

RedoViewExtension.java
44 44
import org.gvsig.andami.messages.NotificationManager;
45 45
import org.gvsig.andami.plugins.Extension;
46 46
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
47
import org.gvsig.fmap.dal.exception.DataException;
48
import org.gvsig.fmap.dal.exception.ReadException;
49 47
import org.gvsig.fmap.mapcontext.layers.FLayer;
50 48
import org.gvsig.fmap.mapcontext.layers.FLayers;
51 49
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
......
65 63
	 * @see org.gvsig.andami.plugins.IExtension#initialize()
66 64
	 */
67 65
	public void initialize() {
68
		PluginServices.getIconTheme().registerDefault(
69
				"view-redo",
70
				this.getClass().getClassLoader().getResource("images/Redo.png")
71
			);
72 66
	}
73 67

  
74 68
	/**
......
78 72
		DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow();
79 73
		MapControl mapControl = vista.getMapControl();
80 74

  
81
		if (s.compareTo("REDO") == 0) {
75
		if (s.compareTo("edit-redo-layer") == 0) {
82 76
			try {
83 77
					FLayers layers=mapControl.getMapContext().getLayers();
84 78
					for (int i=0;i<layers.getLayersCount();i++){
85 79
						if (layers.getLayer(i) instanceof FLyrVect && layers.getLayer(i).isEditing() && layers.getLayer(i).isActive()){
86 80
							((FLyrVect)layers.getLayer(i)).getFeatureStore().redo();
87
//							CommandsRecord commandsRecord=((FLyrVect)layers.getLayer(i)).getFeatureStore().getCommandsRecord();
88
//							commandsRecord.redo();
89 81
							mapControl.drawMap(false);
90
//							vea.getCommandRecord().fireCommandsRepaint(null);
91
//							vea.getSelection().clear();
92
//							CADExtension.getCADTool().clearSelection();
93 82
						}
94 83

  
95 84
					}
96
//			} catch (ReadException e) {
97
//				NotificationManager.addError(e.getMessage(),e);
98
//			} catch (DataException e) {
99
//				NotificationManager.addError(e.getMessage(),e);
100 85
			} catch (RedoException e) {
101 86
				NotificationManager.addError(e.getMessage(),e);
102 87
			}
103

  
104
			//vista.getMapControl().drawMap(false);
105 88
		}
106 89
	}
107 90

  

Also available in: Unified diff