fix binding loops in Indexer client ability

work/m_layershell
Michail Vourlakos 3 years ago
parent 9ce7c5b72d
commit 7e1b0bc2ee

@ -104,8 +104,8 @@ AbilityDefinition.Indexer {
for(var i=0; i<layout.children.length; ++i) { for(var i=0; i<layout.children.length; ++i) {
var item = layout.children[i]; var item = layout.children[i];
if (item && item.itemIndex>=0 if (item && item.itemIndex>=0
&& separators.indexOf(item.itemIndex)<0 && !item.isSeparator /*not using "separators" array to avoid binding loops*/
&& hidden.indexOf(item.itemIndex)<0 && !(item.isHidden || item.isSeparatorHidden) /*not using "hidden" array to avoid binding loops*/
&& item.itemIndex < ind) { && item.itemIndex < ind) {
ind = item.itemIndex; ind = item.itemIndex;
} }
@ -124,9 +124,10 @@ AbilityDefinition.Indexer {
for(var i=0; i<layout.children.length; ++i) { for(var i=0; i<layout.children.length; ++i) {
var item = layout.children[i]; var item = layout.children[i];
if (item && item.itemIndex>=0 if (item && item.itemIndex>=0
&& separators.indexOf(item.itemIndex)<0 && !item.isSeparator /*not using "separators" array to avoid binding loops*/
&& hidden.indexOf(item.itemIndex)<0 && !(item.isHidden || item.isSeparatorHidden) /*not using "hidden" array to avoid binding loops*/
&& item.itemIndex > ind) { && item.itemIndex > ind) {
//console.log("org/kde/latte SETTING UP ::: " + item.itemIndex + " / " + layout.children.length); //console.log("org/kde/latte SETTING UP ::: " + item.itemIndex + " / " + layout.children.length);
ind = item.itemIndex; ind = item.itemIndex;

Loading…
Cancel
Save