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

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
autocart
Posts: 1388
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.
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 66624
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 1388
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: 66624
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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