Commit c9b41021 authored by GoshaZotov's avatar GoshaZotov

use function setSelection for change selection(WorksheetView->sortRange)

parent 2f18b15e
......@@ -11742,25 +11742,20 @@
var rgbColor = color ? new AscCommonExcel.RgbColor((color.asc_getR() << 16) + (color.asc_getG() << 8) + color.asc_getB()) : null;
//expand selectionRange
var selectionRange = t.model.selectionRange;
if(bIsExpandRange)
{
var lastRange = selectionRange.getLast().clone();
var selectionRange = t.model.selectionRange;
var activeCell = selectionRange.activeCell;
var activeCellRange = new Asc.Range(activeCell.col, activeCell.row, activeCell.col, activeCell.row);
var expandRange = t.model.autoFilters._getAdjacentCellsAF(activeCellRange);
selectionRange.ranges[selectionRange.ranges.length - 1] = expandRange;
//change selection
t.setSelection(expandRange);
}
//sort
t.setSelectionInfo("sort", type, null, null, rgbColor);
if(bIsExpandRange)
{
selectionRange.ranges[selectionRange.ranges.length - 1] = lastRange;
}
//TODO здесь необходимо селект перерисовывать
//TODO возможно стоит возвратить selection обратно
} else if (false !== sortProps) {
t._isLockedCells(sortProps.sortRange.bbox, /*subType*/null, onSortAutoFilterCallBack);
......
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