Page 1 of 1

separate tree node expanding bug

Posted: 2019-06-17, 11:13 UTC
by mosunovpa
Hello.
Very small bug. When i expand non-focused node of the separate tree by clicking an arrow the new tree item becomes selected. I suppose the tree should not change item selection in that case.

Re: separate tree node expanding bug

Posted: 2019-11-17, 17:57 UTC
by DrShark
mosunovpa wrote: 2019-06-17, 11:13 UTCWhen i expand non-focused node of the separate tree by clicking an arrow the new tree item becomes selected.
What do you mean by "arrow"?

If you meant the [+] item to expand folders in Separate Tree, a click on it with mouse expands the separate tree without changing the current path in active panel, so here it works as expected.

If to set the focus on a separate tree using a command cm_FocusSrcTree, and use up/down arrow keys, they will change focus+selection (it's the same thing for separate tree), and panel's current path will follow focused-selected folder in Separate tree. I don't think it's possible to expand not-focused folders of Separate Tree with arrow keys in a way similar to one possible using mouse and [+] control. As far as I know, described behavior is designed to work this way, I even made a suggestion to enhance it for different workflow, but currently the development of features (and even some bugfixing) related to trees is on hiatus.

Re: separate tree node expanding bug

Posted: 2019-11-17, 18:11 UTC
by Horst.Epp
mosunovpa wrote: 2019-06-17, 11:13 UTC Hello.
Very small bug. When i expand non-focused node of the separate tree by clicking an arrow the new tree item becomes selected. I suppose the tree should not change item selection in that case.
Not for me.
The tree is expanded and no focus change is made on any of the other two windows.

Re: separate tree node expanding bug

Posted: 2019-11-17, 20:01 UTC
by petermad
2DrShark
If you meant the [+] item to expand folders in Separate Tree
whether you see a [+] or a little triangle depends on these 2 settings in the [Color] section of wincmd.ini:
TreeLineColor=-1 Sets the color of the connecting lines in the tree inside of the file panels, the separate trees, the Alt+F10 tree dialog, and the FTP connect dialog. Values: rgb-value, or -1=default, or -2= invisible
TreeTriangles=-1 Icons to expand/collapse tree:
0: Show [+]
1: Show triangle if supported
-1: Let TC decide
By Default TC shows triangles (in newer OS's), but if TreeLineColor=0 (black) and TreeTriangles=-1 TC decides to show [+]'s

2mosunovpa
The focus is changed in the tree itself when clicking a node, but the file panels are unchanged, so it is not quite the way it is in Windows Explorer.

But both in TC and Explorer It is first when you click on the folder name that the file panel is changed to that folder.

Re: separate tree node expanding bug

Posted: 2019-11-18, 09:13 UTC
by DrShark
petermad wrote: 2019-11-17, 20:01 UTC whether you see a [+] or a little triangle depends on these 2 settings in the [Color] section of wincmd.ini:
...
On my OS with clean ini TC decides to use [+] by default.
petermad wrote: 2019-11-17, 20:01 UTCThe focus is changed in the tree itself when clicking a node, but the file panels are unchanged
The topic is about Separate Tree, there focus is not changed to a folder for which we're expanding the node, and this behavior doesn't seem to be configurable.

For regular tree it moves there, and in theory there should be a way to disable this behavior using the AllowSetCursorPos=0 setting:

Code: Select all

[Configuration]
AllowSetCursorPos=0
; Sets behaviour when expanding a large directory in tree view with the mouse, e.g. by clicking on the [+] symbol:
; 1: Mouse cursor is moved so it remains on the expanded directory
; 0: Mouse cursor is not moved
Well, just I tried it on the tree of my C:'\ drive and it is still moved, maybe all the dirs there arn't large enough to make this setting work (but I tried to expand a dir with 65000 subdirs, and cursor moved on it anyway)...

Re: separate tree node expanding bug

Posted: 2019-11-18, 12:56 UTC
by petermad
The topic is about Separate Tree, there focus is not changed to a folder for which we're expanding the node, and this behavior doesn't seem to be configurable.
I am talking about the separate tree too. With focus I mean the selection bar in the tree panel - it moves to the folder in the tree of wich I clicked the node to the left of the folder name. And the color of the folder turns red (with clean ini). This applies to 64bit TC

BUT I just discovered that in 32bit TC the selection bar stays where it is - as you experience.

So the behaviour depends on the bitness of TC - I myself would prefer if both versions worked as the 32 bit version

On my OS with clean ini TC decides to use [+] by default.
On my Windows 7, 8.1 and 10 computers it defaults to a triangle. On my Windows XP computer it defaults to [+].

For regular tree it moves there, and in theory there should be a way to disable this behavior using the AllowSetCursorPos=0 setting:
This setting applies to the MOUSE cursor - not the selection cursior bar.

Re: separate tree node expanding bug

Posted: 2020-01-01, 10:41 UTC
by DrShark
petermad wrote: 2019-11-18, 12:56 UTCI am talking about the separate tree too. With focus I mean the selection bar in the tree panel - it moves to the folder in the tree of wich I clicked the node to the left of the folder name. And the color of the folder turns red (with clean ini). This applies to 64bit TC

BUT I just discovered that in 32bit TC the selection bar stays where it is - as you experience.
I can confirm this inconsistency in separate trees of Total Commander 9.50 beta 11 x32 and x64 with default TC settings on Windows 10 1903 (18362.535). On x32 clicking the node just expands it, on x64 focus also moves a to a tree folder which node we're clicking.

Re: separate tree node expanding bug

Posted: 2020-01-08, 22:28 UTC
by petermad
*Bump* - since this inconsistency also applies to TC 9.5b12

Re: separate tree node expanding bug

Posted: 2020-01-09, 11:30 UTC
by ghisler(Author)
So far I couldn't find out why this is happening - seems to be a different implementation of the listbox control in Delphi and Lazarus.

Re: separate tree node expanding bug

Posted: 2020-01-10, 11:59 UTC
by DrShark
HISTORY.TXT wrote:10.01.20 Fixed: Separate tree: Do not focus line when just clicking on expand or collapse icon (64)
Confirmed fixed in TC 9.50 beta 12a 64-bit.

Re: separate tree node expanding bug

Posted: 2020-01-10, 18:38 UTC
by petermad
I can confirm the fix in TC 9.5b12a too :-)

Re: separate tree node expanding bug

Posted: 2020-01-13, 10:32 UTC
by ghisler(Author)
Thanks - I had to modify the Lazarus library to make it work.