Revision 39212 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/gui/command/CommandTableModel.java
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) { |
Also available in: Unified diff