Commit 53d11c62 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix get selection for create new history point

parent 5570b197
......@@ -619,12 +619,13 @@ CHistory.prototype.Create_NewPoint = function()
var UpdateRigions = {};
var Time = new Date().getTime();
var UndoSheetId = null, oSelectionState = this.workbook.handlers.trigger("getSelectionState");
// ToDo Берем всегда, т.к. в случае с LastState мы можем не попасть на нужный лист и не заселектить нужный диапазон!
var oSelectRange = this.workbook.handlers.trigger("getSelection");
var oSelectRange = null;
var wsActive = this.workbook.getWorksheet(this.workbook.getActive());
if (wsActive)
if (wsActive) {
UndoSheetId = wsActive.getId();
// ToDo Берем всегда, т.к. в случае с LastState мы можем не попасть на нужный лист и не заселектить нужный диапазон!
oSelectRange = wsActive.selectionRange.getLast(); // ToDo get only last selection range
}
// Создаем новую точку
this.Points[++this.Index] = {
......
......@@ -712,9 +712,6 @@
this.model.handlers.add("setSelection", function() {
self._onSetSelection.apply(self, arguments);
});
this.model.handlers.add("getSelection", function() {
return self._onGetSelection.apply(self);
});
this.model.handlers.add("getSelectionState", function() {
return self._onGetSelectionState.apply(self);
});
......@@ -909,11 +906,6 @@
this.controller.scroll(d);
};
WorkbookView.prototype._onGetSelection = function() {
var ws = this.getWorksheet(null, true);
return ws ? ws.getActiveRangeObj() : null;
};
WorkbookView.prototype._onGetSelectionState = function() {
var res = null;
var ws = this.getWorksheet(null, true);
......
......@@ -7353,9 +7353,6 @@
this.model.workbook.handlers.trigger( "asc_onHideComment" );
this._updateSelectionNameAndInfo();
};
WorksheetView.prototype.getActiveRangeObj = function () {
return this.activeRange.clone( true );
};
WorksheetView.prototype.setSelection = function (range, validRange) {
var selectionRange, tmpRange;
// Проверка на валидность range.
......
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