X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=tools%2Fbuild_gtk_tree.js;h=526fa59f49f18b0797844aace0fbbd33854e16f8;hb=e06c1cf8c9a2c679eef536271e5478c3fa6406c8;hp=e404023238d20fbff50b84e618e008a5152b3147;hpb=1d5c57bd4e63de8e28f327a7f836d5ff6964ab09;p=app.Builder.js diff --git a/tools/build_gtk_tree.js b/tools/build_gtk_tree.js index e40402323..526fa59f4 100644 --- a/tools/build_gtk_tree.js +++ b/tools/build_gtk_tree.js @@ -297,7 +297,16 @@ right: tops[cls].pushUnique(par); } } - function canTop(cls) { + function canTop(cls, rec) { + + rec = rec || 0; + print('CANTOP: ' + cls + ' =' + rec); + if (rec > 5) { + print('SKIP : ' + cls); + } + if (typeof(tops[cls]) == 'undefined') { + return false; + } for (var i =0; i < tops[cls].length; i++) { if (tops[cls][i] == '*top') { return true; @@ -305,7 +314,7 @@ right: if (cls == tops[cls][i]) { continue; } - if (canTop(cls)) { + if (canTop(cls, rec+1)) { return true; } }