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

Things you’d like to miss in the future...
Post Reply
autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

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

Post 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.
Attachments
This shows the problem directly.
This shows the problem directly.
Problem - Wrong folder gets highlighted as 'current'.gif (281.05 KiB) Viewed 381 times
This shows the script behind the button and in the echo dialog the loadtree line that gets executed.
This shows the script behind the button and in the echo dialog the loadtree line that gets executed.
The Script leading to the Problem.gif (1.18 MiB) Viewed 382 times

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

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

Post by admin »

Yep. Side effect of fixing your recursion. Next beta should solve it.

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

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

Post by autocart »

Judging by the time stamp, that next beta re-introduced the recursiveness of loadtree inside a loc change CEA again.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

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

Post by admin »

Confirmed. I'll try another way.


Post Reply