Commit d4ee817d authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix set selection after undo/redo

parent 9151ef87
...@@ -7310,23 +7310,24 @@ ...@@ -7310,23 +7310,24 @@
return this._calcActiveCellOffset(); return this._calcActiveCellOffset();
}; };
WorksheetView.prototype.setSelectionUndoRedo = function ( range, validRange ) { WorksheetView.prototype.setSelectionUndoRedo = function (range, validRange) {
var ar = (range instanceof asc_ActiveRange) ? range.clone() : new asc_ActiveRange( range ); var ar = (range instanceof asc_ActiveRange) ? range.clone() : new asc_ActiveRange(range);
// Проверка на валидность range. // Проверка на валидность range.
if ( validRange && (ar.c2 >= this.nColsCount || ar.r2 >= this.nRowsCount) ) { if (validRange && (ar.c2 >= this.nColsCount || ar.r2 >= this.nRowsCount)) {
if ( ar.c2 >= this.nColsCount ) { if (ar.c2 >= this.nColsCount) {
this.expandColsOnScroll( false, true, ar.c2 + 1 ); this.expandColsOnScroll(false, true, ar.c2 + 1);
} }
if ( ar.r2 >= this.nRowsCount ) { if (ar.r2 >= this.nRowsCount) {
this.expandRowsOnScroll( false, true, ar.r2 + 1 ); this.expandRowsOnScroll(false, true, ar.r2 + 1);
} }
} }
var oRes = null; var oRes = null;
var type = ar.type; var type = ar.type;
if ( type == c_oAscSelectionType.RangeCells || type == c_oAscSelectionType.RangeCol || type == c_oAscSelectionType.RangeRow || type == c_oAscSelectionType.RangeMax ) { if (type == c_oAscSelectionType.RangeCells || type == c_oAscSelectionType.RangeCol ||
type == c_oAscSelectionType.RangeRow || type == c_oAscSelectionType.RangeMax) {
this.cleanSelection(); this.cleanSelection();
this.activeRange = ar; this.model.selectionRange.assign2(ar);
this._drawSelection(); this._drawSelection();
this._updateSelectionNameAndInfo(); this._updateSelectionNameAndInfo();
......
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