Commit ddfbbbdc authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 24931 - Не пересчитываются формулы после Undo автозаполнения

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56938 954022d7-b5bf-4e40-9824-e11837661b57
parent e43b60fa
...@@ -646,6 +646,7 @@ DependencyGraph.prototype = { ...@@ -646,6 +646,7 @@ DependencyGraph.prototype = {
}, },
_getNodeDependence:function ( oRes, oSheetRanges, node ) { _getNodeDependence:function ( oRes, oSheetRanges, node ) {
var bBad = false; var bBad = false;
var bStop = false;
var oWeightMapElem = oRes.oWeightMap[node.nodeId]; var oWeightMapElem = oRes.oWeightMap[node.nodeId];
if ( null == oWeightMapElem ) { if ( null == oWeightMapElem ) {
oWeightMapElem = {cur:0, max:1, gray:false, bad:false, master:false, area:false}; oWeightMapElem = {cur:0, max:1, gray:false, bad:false, master:false, area:false};
...@@ -654,20 +655,22 @@ DependencyGraph.prototype = { ...@@ -654,20 +655,22 @@ DependencyGraph.prototype = {
else { else {
oWeightMapElem.max++; oWeightMapElem.max++;
//если пришли в gray node, то это цикл //если пришли в gray node, то это цикл
if ( oWeightMapElem.gray ) if (oWeightMapElem.gray) {
bStop = true;
bBad = oWeightMapElem.bad = true; bBad = oWeightMapElem.bad = true;
}
else { else {
if ( oWeightMapElem.master && oWeightMapElem.max > 1 ) if (oWeightMapElem.master && oWeightMapElem.max > 1) {
{ bStop = true;
//если повторно пришли в master node, то не считаем ее master //если повторно пришли в master node, то не считаем ее master
oWeightMapElem.master = false; oWeightMapElem.master = false;
oWeightMapElem.max--; oWeightMapElem.max--;
} }
} }
} }
if ( 1 == oWeightMapElem.max ) if (!bStop && 1 == oWeightMapElem.max)
this._getNodeDependenceNodeToRange( node.sheetId, node.getBBox(), oSheetRanges ); this._getNodeDependenceNodeToRange(node.sheetId, node.getBBox(), oSheetRanges);
if ( !bBad && oWeightMapElem.max <= 1 ) { if (!bStop && !bBad && oWeightMapElem.max <= 1) {
oWeightMapElem.gray = true; oWeightMapElem.gray = true;
var aNext = node.getSlaveEdges(); var aNext = node.getSlaveEdges();
for ( var i in aNext ) { for ( var i in aNext ) {
......
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