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

fix bug #26186

При выделении аргументов формулы лишний раз делались перерисовки диапазонов.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67399 954022d7-b5bf-4e40-9824-e11837661b57
parent 8b3d3fd1
......@@ -876,9 +876,8 @@
if (!bIsOpen)
this._updateEditorState(isFormula);
this.handlers.trigger("updateFormulaEditMod", isFormula);
var ret1 = this._parseFormulaRanges();
var ret2 = this.canEnterCellRange();
this.handlers.trigger("updateFormulaEditModEnd", ret1 || ret2);
this._parseFormulaRanges();
this.handlers.trigger("updateFormulaEditModEnd");
};
// Обновляем состояние Undo/Redo
......
......@@ -146,6 +146,7 @@
this.wsViews = [];
this.cellEditor = undefined;
this.fontRenderingMode = null;
this.lockDraw = false; // Lock отрисовки на некоторое время
this.popUpSelector = null;
this.formulasList = null; // Список всех формул
......@@ -196,14 +197,14 @@
this.defaultFont = new asc.FontProperties(this.model.getDefaultFont(), this.model.getDefaultSize());
//-----------------------
this.m_dScrollY = 0;
this.m_dScrollX = 0;
this.m_dScrollY_max = 1;
this.m_dScrollX_max = 1;
this.m_dScrollY = 0;
this.m_dScrollX = 0;
this.m_dScrollY_max = 1;
this.m_dScrollX_max = 1;
this.MobileTouchManager = null;
this.MobileTouchManager = null;
this.defNameAllowCreate = true;
this.defNameAllowCreate = true;
this._init(fontRenderingMode);
......@@ -305,13 +306,18 @@
"editCell": function () {self._onEditCell.apply(self, arguments);},
"stopCellEditing": function () {return self._onStopCellEditing.apply(self, arguments);},
"empty": function () {self._onEmpty.apply(self, arguments);},
"canEnterCellRange": function () {
self.cellEditor.setFocus(false);
var ret = self.cellEditor.canEnterCellRange();
ret ? self.cellEditor.activateCellRange() : true;
return ret;
},
"enterCellRange": function () {self.cellEditor.setFocus(false); self.getWorksheet().enterCellRange(self.cellEditor);},
"canEnterCellRange": function() {
self.cellEditor.setFocus(false);
var ret = self.cellEditor.canEnterCellRange();
ret ? self.cellEditor.activateCellRange() : true;
return ret;
},
"enterCellRange": function () {
self.lockDraw = true;
self.cellEditor.setFocus(false);
self.getWorksheet().enterCellRange(self.cellEditor);
self.lockDraw = false;
},
"copy": function () {self.copyToClipboard.apply(self, arguments);},
"paste": function () {self.pasteFromClipboard.apply(self, arguments);},
"cut": function () {self.cutToClipboard.apply(self, arguments);},
......@@ -388,14 +394,20 @@
self.controller.setFormulaEditMode.apply(self.controller, arguments);
var ws = self.getWorksheet();
if (ws) {
ws.cleanSelection();
if (!self.lockDraw) {
ws.cleanSelection();
}
ws.cleanFormulaRanges();
ws.setFormulaEditMode.apply(ws, arguments);
}
},
"updateEditorState" : function (state) {self.handlers.trigger("asc_onEditCell", state);},
"isGlobalLockEditCell" : function () {return self.collaborativeEditing.getGlobalLockEditCell();},
"updateFormulaEditModEnd" : function (rangeUpdated) {self.getWorksheet().updateSelection();},
"updateFormulaEditModEnd" : function () {
if (!self.lockDraw) {
self.getWorksheet().updateSelection();
}
},
"newRange" : function (range) { self.getWorksheet().addFormulaRange(range); },
"existedRange" : function (range) { self.getWorksheet().activeFormulaRange(range); },
"updateUndoRedoChanged" : function (bCanUndo, bCanRedo) {
......
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