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