Total number of operations for Undo / Redo

Currently, if you revert to the first operation in your project history, you will see Undo / Redo 0. Opening an old project this morning I was confused and thought it was a new one because of this, but in fact I already had many operations on this project, it was just that before closing it I had viewed the file at first operation.

This PR proposes to change the display to Undo / Redo 1/n with n the total number of operations available.
This commit is contained in:
Sylvain Machefert 2018-05-18 08:51:50 +02:00 committed by GitHub
parent 019514f01a
commit 680221cff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ HistoryPanel.prototype.update = function(onDone) {
HistoryPanel.prototype._render = function() {
var self = this;
this._tabHeader.html($.i18n._('core-project')["undo-redo"]+' <span class="count">' + this._data.past.length + '</span>');
this._tabHeader.html($.i18n._('core-project')["undo-redo"]+' <span class="count">' + this._data.past.length + ' / ' + ( this._data.future.length + this._data.past.length ) + '</span>');
this._div.empty().unbind().html(DOM.loadHTML("core", "scripts/project/history-panel.html"));