Page 1 of 1

Problem - Wrong folder gets highlighted as 'current' in the Mini Tree

Posted: 24 Oct 2021 18:18
by autocart
Hi Don,
another bug. It is seen in the two gifs attached. It would most likely only surface in a scripted environment when loadtree is called on each tab change and the folder structure is complex enough. I cannot find the exact pattern of why or how this happens, but I can reproduce it each time in a fresh instance. The two tabs, it seems, must show locations in different branches. At least, then the bug is more likely to surface.

It seems to me that this was introduced in version 22.30.0205.

Here is the code that needs to be executed each time of the tab change. If you want to try, then switch tabs with running the code at least two times.

Code: Select all

if (get("#489") == 1) { // #489 = Mini Tree
  $curSubfolders = (exists(<curpath>) == 2) ? (listfolder(<curpath>, , 2)) : "";
  $loadtreeFolderList = "<curpath>" . ($curSubfolders ? ("|" . $curSubfolders) : "") . "|" . get("Tabs");
  loadtree $loadtreeFolderList, 0;
  echo "loadtree """ . $loadtreeFolderList . """, 0;";
Here is the text from the Echo dialog.
Echo wrote:loadtree "C:\Users\Public\Branch 1 (Level 1)\B1(L2) - Sub 1\B1(L3)-S1-S2\B1(L4)-S1-S2-S2\B1(L5)-S1-S2-S2\B1(L6)-S1-S2-S2\B1(L7)-S1-S2-S2|C:\Users\Public|C:\Users\Public\Branch 1 (Level 1)\B1(L2) - Sub 1\B1(L3)-S1-S2\B1(L4)-S1-S2-S2\B1(L5)-S1-S2-S2\B1(L6)-S1-S2-S2\B1(L7)-S1-S2-S2|C:\Users\Public\Branch 1 (Level 1)\B1(L2) - Sub 2\B1(L3)-S2-S2", 0;
BTW: The more folders are open in tabs, the messier it gets with the highlighting in the tree.

Re: Problem - Wrong folder gets highlighted as 'current' in the Mini Tree

Posted: 24 Oct 2021 19:08
by admin
Yep. Side effect of fixing your recursion. Next beta should solve it.

Re: Problem - Wrong folder gets highlighted as 'current' in the Mini Tree

Posted: 24 Oct 2021 20:35
by autocart
Judging by the time stamp, that next beta re-introduced the recursiveness of loadtree inside a loc change CEA again.

Re: Problem - Wrong folder gets highlighted as 'current' in the Mini Tree

Posted: 24 Oct 2021 21:21
by admin
Confirmed. I'll try another way.

Re: Problem - Wrong folder gets highlighted as 'current' in the Mini Tree

Posted: 25 Oct 2021 12:52
by autocart
Thanks! It is fixed again. :-)