Remove undo options, make stackundo default behavior

This commit is contained in:
Camille Scholtz
2016-05-27 23:39:27 +02:00
parent 007ece1e78
commit 1806ef3ad0
4 changed files with 13 additions and 26 deletions

View File

@@ -115,13 +115,10 @@ func (eh *EventHandler) Undo() {
te = t.(*TextEvent)
undoThreshold := int64(settings["undothreshold"].(float64))
if startTime-(te.time.UnixNano()/int64(time.Millisecond)) > undoThreshold {
return
} else {
if settings["stackundo"] == true {
startTime = t.(*TextEvent).time.UnixNano() / int64(time.Millisecond)
}
startTime = t.(*TextEvent).time.UnixNano() / int64(time.Millisecond)
}
eh.UndoOneEvent()
@@ -171,7 +168,6 @@ func (eh *EventHandler) Redo() {
te = t.(*TextEvent)
undoThreshold := int64(settings["undothreshold"].(float64))
if (te.time.UnixNano()/int64(time.Millisecond))-startTime > undoThreshold {
return
}