Commit 8342cf38 authored by Ilya Kirillov's avatar Ilya Kirillov

Updated state of undo button in a fast collaboration mode.

parent 3b555c8f
......@@ -8143,7 +8143,12 @@ CDocument.prototype.Document_UpdateUndoRedoState = function()
// данные события при изменении значения History.Index
// Проверяем состояние Undo/Redo
this.Api.sync_CanUndoCallback(this.History.Can_Undo());
var bCanUndo = this.History.Can_Undo();
if (true !== bCanUndo && this.Api && this.CollaborativeEditing && true === this.CollaborativeEditing.Is_Fast() && true !== this.CollaborativeEditing.Is_SingleUser())
bCanUndo = this.CollaborativeEditing.CanUndo();
this.Api.sync_CanUndoCallback(bCanUndo);
this.Api.sync_CanRedoCallback(this.History.Can_Redo());
this.Api.CheckChangedDocument();
};
......
......@@ -2359,9 +2359,6 @@ background-repeat: no-repeat;\
};
asc_docs_api.prototype.sync_CanUndoCallback = function(bCanUndo)
{
if (true === AscCommon.CollaborativeEditing.Is_Fast() && true !== AscCommon.CollaborativeEditing.Is_SingleUser())
bCanUndo = false;
this.sendEvent("asc_onCanUndo", bCanUndo);
};
asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment