[TC 11.02] Tree View overwrites default Tab

Moderators: white, Hacker, petermad, Stefan2

Glirastes
Junior Member
Junior Member
Posts: 7
Joined: 2023-03-23, 20:26 UTC

[TC 11.02] Tree View overwrites default Tab

Post by *Glirastes »

I noticed some behavior with tree view that I find odd.

Preconditions:
  • Save on Exit -> Directories is off
  • the default tab to be opened and selected at start of TC is a normal directory tab
Now if the selected tab in that panel is a tree view tab and TC is exited, on next startup, TC will overwrite the default tab with a tree view tab.
If tree view should be an exception to the setting of not saving directories on exit (it is true that tree view does not really represent a directory), then I would at least expect it to be re-opened in a new tab.
If not, it obviously should not override the default tab.

Furthermore, if the default tab is a locked tab, tree view is opened in a new tab and the default tab gets bugged. The name of the default tab becomes the drive letter of the containing drive / partition, and if you try to select it, it will only jump to the tree view tab.
This is probably not intended either, as it makes the default tab useless.

If you now select a normal directory tab and close TC, on the next startup, everything will be fine again (since TC does not write default tabs to disk during the above process).

Another related bug:
If the default tab is actually a tree view tab, and you change that tab to a normal directory and close TC, on the next startup, that tab will be the root directory of the drive / partition that was active when the tree view was spawned. Is this intended? I would like to be able to make tree view a default tab and not just a status of the panel. Either way, the title of that tab then says Tree, although it is not a tree view anymore, but a normal directory tab. Concluding: Either it should correctly rename the tab to the directory that it was changed to, or the tab should stay a tree view tab.

Minor issues really.
And apologies if I misunderstood the concept of tree view, but since it can be opened as a tab, I figured it should in that case also behave and be treated like a proper tab.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC 11.02] Tree View overwrites default Tab

Post by *Horst.Epp »

I guess most user don't open a tree view inside a tab.
There are command to open one or two tree views, which are never in a tab.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *ghisler(Author) »

Now if the selected tab in that panel is a tree view tab and TC is exited, on next startup, TC will overwrite the default tab with a tree view tab.
It just keeps the tab as you left them, so if the active tab was a tree view, it will be restored.
Furthermore, if the default tab is a locked tab, tree view is opened in a new tab and the default tab gets bugged.
How did you manage to open a tree view on a locked tab? When I try this, it opens the tree view on a new tab. I can open a tree view on a tab with option "Locked but directory changes allowed", but I can revert it to a normal view even after restarting Total Commander.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *petermad »

2Glirastes
Save on Exit -> Directories is off
Try and disable "Panels (brief/full etc.)" instead - Tree view is a panel view mode, not a directory.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Glirastes
Junior Member
Junior Member
Posts: 7
Joined: 2023-03-23, 20:26 UTC

Re: [TC 11.02] Tree View overwrites default Tab

Post by *Glirastes »

ghisler(Author) wrote: 2024-02-21, 22:00 UTC It just keeps the tab as you left them, so if the active tab was a tree view, it will be restored.
I thought this should not be the case, since TC was configured to not save directories on exit. Thank you petermad for clarifying, that this behaviour for tree view is controlled via the other option, Save on exit -> Panels (brief/full, etc.), which I missed completely. That answers my first question, that tree view is in fact supposed to be reopened on the next startup, since it is not affected by the directory setting, but the issue with it overriding the default directory tab remains.
ghisler(Author) wrote: 2024-02-21, 22:00 UTC How did you manage to open a tree view on a locked tab?
I didn't. TC (on startup) tries to convert the default (directory) tab into a tree view, but fails due to it being locked. In my opinion it shouldn't even try to convert the default tab, but rather open tree view in a new tab, not affecting the others. And even if it is supposed to override the default tab, it shouldn't just make it completely unusable when being a locked tab, because in that case it has to be opened in a new tab anyway.

To clarify, when this "overriding" occurs:
  • Save on exit -> Directories is off
  • Save on exit -> Panels (brief/full, etc.) is on
  • The default tab to be opened at startup of TC is a normal directory tab
If I now start TC, it opens the default tabs. So far so good. Now I open a new tab in the same panel and convert that tab to a tree view with CTRL + F8. So I now have open all of my default tabs as well as one tree view tab. While that tree view tab is still selected, I close TC.
What I would expect to happen on the next startup: TC opens all of the default tabs as well as the tree view tab I opened last time. But TC actually doesn't open tree view in a new tab, but it tries to convert the one of my default tabs to a tree view, that was to be active at program startup. Which I find odd, since TC could just open tree view in a new tab and not touch the default tabs, like I had it when I closed the program.
If that tab is not locked, it succeeds and that tab now is a tree view. If that tab is locked, TC actually has to open the tree view in a new tab, but the default tab then gets bugged, as I described, which really can't be intentional.

I hope it has become clear now, otherwise I might make a short diashow or video.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *petermad »

What I would expect to happen on the next startup: TC opens all of the default tabs as well as the tree view tab I opened last time.
When save on exit -> Directories is off - then new folder tabs are not saved when you exit TC. But the View mode (i.e. Tree) is saved and TC has to apply that to the active tab on restart. If you open a new tab and set it's view mode to Tree and then use "Configuration" -> "Save settings" - then the Tree will be opened in that new tab on restart.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *ghisler(Author) »

I thought this should not be the case, since TC was configured to not save directories on exit.
It's a view mode, not a directory.
Author of Total Commander
https://www.ghisler.com
Glirastes
Junior Member
Junior Member
Posts: 7
Joined: 2023-03-23, 20:26 UTC

Re: [TC 11.02] Tree View overwrites default Tab

Post by *Glirastes »

2petermad
Alright, but what if the active tab on restart is a locked tab? Then TC has to open the tree view in a new tab, but shouldn't the locked tab stay usable? Because currently what happens is that it gets bugged, meaning I cannot select it, instead it jumps to the tree view tab.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *petermad »

2Glirastes
You are right that things gets buggy when there is a locked tab as the active tab on startup - then changing to Tree view opens Tree view in a new tab, and if TC is restarted when that Tree view tab is active then the locked tab points to c: after restart.

If the tabe is Locked but directory changes allowed it is not so bad - after restart you can change to Full view and click on the locked tab to go to the root of that tab.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Glirastes
Junior Member
Junior Member
Posts: 7
Joined: 2023-03-23, 20:26 UTC

Re: [TC 11.02] Tree View overwrites default Tab

Post by *Glirastes »

So that would be my suggestion then, to fix the behavior with (fully) locked active tabs on startup. Locking a tab should grant immunity to changes of all sort.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *petermad »

There is also another peculiarity:

If I open a new folder tab, set if to Tree view and lock it, then every time I navigate in the tree I get the question: "This tab is locked! Open new Tab?" and even if I choose OK, no new tab is opened, and I keep getting the question.

If I then save the settings - close TC and start it again, then a new tab is automatically opened with the Tree view, and if I close that tab and click on the locked tab with the Tree view, then a new Tree view tab is automatically opened without any questions.

Maybe it should simply not be possible to change locked tabs to Tree view and to lock a tab that is in Tree view mode.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *ghisler(Author) »

After further analysis, the problem happens when "Directories" is unchecked but "Panels (brief/full, etc.)" is checked in "Save on Exit". Then Total Commander tries to save the tree mode but not the rest of the tabs.

I found two main reasons why there can be a problem:
1. The current tab could be a different tab than the one saved in the wincmd.ini, so the new mode would be saved for the wrong tab.
2. The current tab could be the same, but locked.

So as a fix, I will not save the brief/full/tree mode if either the tab is different than saved, or the tab is locked.

Did I miss any other cases?
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *petermad »

2ghisler(Author)
So as a fix, I will not save the brief/full/tree mode if either the tab is different than saved, or the tab is locked.
I don't think you need to be so restrictive - it is only the Tree view that should NOT be saved because it is not a folder view - all the other view modes - Full, Brief, Comments, Thumbnail, Custom Columns and even Custom View mode are all folder views and should not represent any problem being saved.

I currently see another problem (it is not related to the save on exit settings):
If the active folder tab is locked (and it's settings are saved) and I use the command cm_Exit 9 or cm_Exit 13 then a new duplicate non-locked tab of the locked tab is opened.

it also happens if I use a command like this:

Code: Select all

[em_ext_newcommander]
cmd=%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%"
param=%Z%X %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%
So it seems to happen when startup directories are passed to TC.

It would be nice if TC compared the startup directories with the directories in the locked active folder tabs and did NOT open a new tab, if the directories are the same.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC 11.02] Tree View overwrites default Tab

Post by *Horst.Epp »

Following all that discussion about Tree view in a tab,
I would like an explanation what is the benefit of it,
regardless of the problems currently discussed.
If I want a tree view, I start a separate tree view for both panels.
Running tree view in a tab looks for me as loosing all the benefits
of seeing a tree and the contents of source and target at the same time.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.02] Tree View overwrites default Tab

Post by *ghisler(Author) »

You may not believe it, but there are people who prefer the Explorer type file management with one tree and one file panel.
Author of Total Commander
https://www.ghisler.com
Post Reply