Skip to content

Commit f5df506

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

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
@@ -981,6 +981,15 @@ ops.OdtDocument = function OdtDocument(odfCanvas) {
981981
eventNotifier.emit(ops.Document.signalCursorMoved, cursor);
982982
};
983983

984+
/**
985+
* Emit the signal that the passed cursor moved.
986+
* @param {?Event} e
987+
* @return {undefined}
988+
*/
989+
this.emitSignalUndoStackChanged = function(e) {
990+
eventNotifier.emit(ops.OdtDocument.signalUndoStackChanged, e);
991+
};
992+
984993
/**
985994
* @return {undefined}
986995
*/

0 commit comments

Comments
 (0)