Skip to content

Commit 0ef8f12

Browse files
author
Friedrich W. H. Kossebau
committed
Let SessionController emit signalUndoStackChanged only via explicit helper method
1 parent d638126 commit 0ef8f12

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

webodf/lib/gui/SessionController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ gui.SessionControllerOptions = function () {
304304
* @return {undefined}
305305
*/
306306
function forwardUndoStackChange(e) {
307-
odtDocument.emit(ops.OdtDocument.signalUndoStackChanged, e);
307+
odtDocument.emitSignalUndoStackChanged(e);
308308
}
309309

310310
/**

webodf/lib/ops/OdtDocument.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,15 @@ ops.OdtDocument = function OdtDocument(odfCanvas) {
984984
eventNotifier.emit(ops.Document.signalCursorMoved, cursor);
985985
};
986986

987+
/**
988+
* Emit the signal that the passed cursor moved.
989+
* @param {?Event} e
990+
* @return {undefined}
991+
*/
992+
this.emitSignalUndoStackChanged = function(e) {
993+
eventNotifier.emit(ops.OdtDocument.signalUndoStackChanged, e);
994+
};
995+
987996
/**
988997
* @return {undefined}
989998
*/

0 commit comments

Comments
 (0)