Revision 39212
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/EditionChangeManager.java | ||
---|---|---|
191 | 191 |
if (type.equals(DefaultFeatureStoreNotification.AFTER_INSERT)){ |
192 | 192 |
view.getMapControl().repaint(); |
193 | 193 |
} |
194 |
if (type.equals(DefaultFeatureStoreNotification.AFTER_UPDATE)){ |
|
194 |
if (type.equals(DefaultFeatureStoreNotification.AFTER_UPDATE) |
|
195 |
|| type.equals(DefaultFeatureStoreNotification.AFTER_REDO) |
|
196 |
|| type.equals(DefaultFeatureStoreNotification.AFTER_UNDO)) { |
|
195 | 197 |
view.getMapControl().rePaintDirtyLayers(); |
196 | 198 |
} |
197 | 199 |
} |
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/UndoViewExtension.java | ||
---|---|---|
43 | 43 |
import org.gvsig.andami.PluginServices; |
44 | 44 |
import org.gvsig.andami.messages.NotificationManager; |
45 | 45 |
import org.gvsig.andami.plugins.Extension; |
46 |
import org.gvsig.app.ApplicationLocator; |
|
46 | 47 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
47 | 48 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
48 | 49 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
... | ... | |
85 | 86 |
for (int i=0;i<layers.getLayersCount();i++){ |
86 | 87 |
if (layers.getLayer(i) instanceof FLyrVect && layers.getLayer(i).isEditing() && layers.getLayer(i).isActive()){ |
87 | 88 |
((FLyrVect)layers.getLayer(i)).getFeatureStore().undo(); |
88 |
// CommandsRecord commandsRecord=((FLyrVect)layers.getLayer(i)).getFeatureStore().getCommandsRecord(); |
|
89 |
// commandsRecord.undo(); |
|
90 | 89 |
mapControl.drawMap(false); |
91 |
// VectorialEditableAdapter vea=(VectorialEditableAdapter)((FLyrVect)layers.getLayer(i)).getSource(); |
|
92 |
// vea.undo(); |
|
93 |
// vea.getCommandRecord().fireCommandsRepaint(null); |
|
94 |
// CADExtension.getCADTool().clearSelection(); |
|
90 |
ApplicationLocator.getManager().refreshMenusAndToolBars(); |
|
95 | 91 |
} |
96 | 92 |
} |
97 |
// } catch (ReadException e) { |
|
98 |
// NotificationManager.addError(e.getMessage(),e); |
|
99 |
// } catch (DataException e) { |
|
100 |
// NotificationManager.addError(e.getMessage(),e); |
|
101 | 93 |
} catch (UndoException e) { |
102 | 94 |
NotificationManager.addError(e.getMessage(),e); |
103 | 95 |
} |
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/RedoViewExtension.java | ||
---|---|---|
43 | 43 |
import org.gvsig.andami.PluginServices; |
44 | 44 |
import org.gvsig.andami.messages.NotificationManager; |
45 | 45 |
import org.gvsig.andami.plugins.Extension; |
46 |
import org.gvsig.app.ApplicationLocator; |
|
46 | 47 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
47 | 48 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
48 | 49 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
... | ... | |
79 | 80 |
if (layers.getLayer(i) instanceof FLyrVect && layers.getLayer(i).isEditing() && layers.getLayer(i).isActive()){ |
80 | 81 |
((FLyrVect)layers.getLayer(i)).getFeatureStore().redo(); |
81 | 82 |
mapControl.drawMap(false); |
83 |
ApplicationLocator.getManager().refreshMenusAndToolBars(); |
|
82 | 84 |
} |
83 | 85 |
|
84 | 86 |
} |
branches/v2_0_0_prep/applications/appgvSIG/config/text.properties | ||
---|---|---|
1139 | 1139 |
_Reverse_selection=Invertir selecci?n |
1140 | 1140 |
_Simple_select=Selecci?n simple |
1141 | 1141 |
_Clear_selection=Deseleccionar todo |
1142 |
_selectionSet=Establecer selecci?n |
|
1143 |
_featureDelete=Eliminar elemento |
|
1142 | 1144 |
|
branches/v2_0_0_prep/applications/appgvSIG/config/text_en.properties | ||
---|---|---|
1060 | 1060 |
_Reverse_selection=Reverse selection |
1061 | 1061 |
_Simple_select=Simple selection |
1062 | 1062 |
_Clear_selection=Clear selection |
1063 |
_selectionSet=Set selection |
|
1064 |
_featureDelete=Remove feature |
|
1063 | 1065 |
|
1066 |
|
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/gui/command/CommandStackDialog.java | ||
---|---|---|
47 | 47 |
private JScrollPane jScrollPane = null; |
48 | 48 |
private JPanel tablePanel = null; |
49 | 49 |
|
50 |
private static final ImageIcon imodify = IconThemeHelper.getImageIcon("layout-tool-undo-redo-actions-modify");
|
|
51 |
private static final ImageIcon iadd = IconThemeHelper.getImageIcon("layout-tool-undo-redo-actions-add");
|
|
52 |
private static final ImageIcon idel = IconThemeHelper.getImageIcon("layout-tool-undo-redo-actions-delete");
|
|
50 |
private static final ImageIcon imodify = IconThemeHelper.getImageIcon("edit-undo-redo-actions-modify");
|
|
51 |
private static final ImageIcon iadd = IconThemeHelper.getImageIcon("edit-undo-redo-actions-add");
|
|
52 |
private static final ImageIcon idel = IconThemeHelper.getImageIcon("edit-undo-redo-actions-delete");
|
|
53 | 53 |
|
54 | 54 |
private CommandTableModel commandTableModel = null; |
55 | 55 |
/** |
... | ... | |
145 | 145 |
int newpos = commandTable.getSelectedRow(); |
146 | 146 |
if (newpos >= 0){ |
147 | 147 |
commandTableModel.setPos(newpos); |
148 |
PluginServices.getMainFrame().enableControls();
|
|
148 |
ApplicationLocator.getManager().refreshMenusAndToolBars();
|
|
149 | 149 |
} |
150 | 150 |
} |
151 | 151 |
}); |
... | ... | |
252 | 252 |
refreshing = true; |
253 | 253 |
currentSliderValue = value; |
254 | 254 |
commandTableModel.setPos(value); |
255 |
ApplicationLocator.getManager().refreshMenusAndToolBars(); |
|
255 | 256 |
refreshing = false; |
256 | 257 |
} |
257 | 258 |
} |
... | ... | |
288 | 289 |
} |
289 | 290 |
if (number != currentValue) { |
290 | 291 |
currentValue = number; |
291 |
refreshControls(); |
|
292 | 292 |
if (fireEvent) { |
293 | 293 |
callValueChanged(new Integer(currentValue)); |
294 | 294 |
} |
295 |
} |
|
295 |
} |
|
296 |
/* |
|
297 |
* This needs to be refreshed also when same number is set |
|
298 |
* Example: select one feature and click 'delete' key |
|
299 |
*/ |
|
300 |
refreshControls(); |
|
296 | 301 |
} |
297 | 302 |
|
298 | 303 |
/** |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/gui/command/CommandTableModel.java | ||
---|---|---|
56 | 56 |
public void setPos(int newpos) { |
57 | 57 |
try { |
58 | 58 |
int currentPos = getPos(); |
59 |
if (newpos > getPos()) {
|
|
60 |
undoRedoStack.redo(newpos - getPos());
|
|
59 |
if (newpos > currentPos) {
|
|
60 |
undoRedoStack.redo(newpos - currentPos);
|
|
61 | 61 |
}else if (newpos < getPos()) { |
62 |
undoRedoStack.undo(getPos() - newpos);
|
|
62 |
undoRedoStack.undo(currentPos - newpos);
|
|
63 | 63 |
} |
64 |
|
|
64 | 65 |
} catch (RedoException e) { |
65 | 66 |
LOG.error("Error executing the command", e); |
66 | 67 |
} catch (UndoException e) { |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/extension/ViewControls.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
import javax.swing.JOptionPane; |
50 | 50 |
|
51 |
import org.slf4j.Logger; |
|
52 |
import org.slf4j.LoggerFactory; |
|
53 |
|
|
51 | 54 |
import org.gvsig.andami.IconThemeHelper; |
52 | 55 |
import org.gvsig.andami.PluginServices; |
53 | 56 |
import org.gvsig.andami.plugins.Extension; |
... | ... | |
71 | 74 |
import org.gvsig.tools.ToolsLocator; |
72 | 75 |
import org.gvsig.tools.dataTypes.DataTypes; |
73 | 76 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
74 |
import org.slf4j.Logger; |
|
75 |
import org.slf4j.LoggerFactory; |
|
76 | 77 |
|
77 | 78 |
|
78 | 79 |
|
... | ... | |
281 | 282 |
IconThemeHelper.registerIcon("action", "view-navigation-zoom-out-center", this); |
282 | 283 |
IconThemeHelper.registerIcon("action", "view-navigation-pan", this); |
283 | 284 |
IconThemeHelper.registerIcon("action", "view-navigation-frame-manager", this); |
285 |
|
|
286 |
IconThemeHelper.registerIcon("action", "edit-undo-redo-actions-modify", this); |
|
287 |
IconThemeHelper.registerIcon("action", "edit-undo-redo-actions-add", this); |
|
288 |
IconThemeHelper.registerIcon("action", "edit-undo-redo-actions-delete", this); |
|
284 | 289 |
|
285 | 290 |
} |
286 | 291 |
|
Also available in: Unified diff