mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Bypass history for undo/redo.
This commit is contained in:
parent
b2d1562595
commit
6985ff5250
@ -521,25 +521,25 @@ public class EditSession implements Extent {
|
|||||||
/**
|
/**
|
||||||
* Restores all blocks to their initial state.
|
* Restores all blocks to their initial state.
|
||||||
*
|
*
|
||||||
* @param sess a new {@link EditSession} to perform the undo in
|
* @param editSession a new {@link EditSession} to perform the undo in
|
||||||
*/
|
*/
|
||||||
public void undo(EditSession sess) {
|
public void undo(EditSession editSession) {
|
||||||
UndoContext context = new UndoContext();
|
UndoContext context = new UndoContext();
|
||||||
context.setExtent(sess);
|
context.setExtent(editSession.bypassHistory);
|
||||||
OperationHelper.completeBlindly(ChangeSetExecutor.createUndo(changeSet, context));
|
OperationHelper.completeBlindly(ChangeSetExecutor.createUndo(changeSet, context));
|
||||||
sess.flushQueue();
|
editSession.flushQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets to new state.
|
* Sets to new state.
|
||||||
*
|
*
|
||||||
* @param sess a new {@link EditSession} to perform the redo in
|
* @param editSession a new {@link EditSession} to perform the redo in
|
||||||
*/
|
*/
|
||||||
public void redo(EditSession sess) {
|
public void redo(EditSession editSession) {
|
||||||
UndoContext context = new UndoContext();
|
UndoContext context = new UndoContext();
|
||||||
context.setExtent(sess);
|
context.setExtent(editSession.bypassHistory);
|
||||||
OperationHelper.completeBlindly(ChangeSetExecutor.createRedo(changeSet, context));
|
OperationHelper.completeBlindly(ChangeSetExecutor.createRedo(changeSet, context));
|
||||||
sess.flushQueue();
|
editSession.flushQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user