?View mode in the active folder tab lost on startup

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

?View mode in the active folder tab lost on startup

Post by *ts4242 »

How to reproduce
1- Start TC with the following settings
2- Execute cm_ToggleAutoViewModeSwitch
3- Restart TC, now the active tab lost its view mode

Code: Select all

[Configuration] 
UseNewDefFont=1 
firstmnu=2170 
SeparateTree=0 
PanelsVertical=0 
Aligned extension=1 
test=254 
[FileSystemPlugins64] 
$checksum$=3014672 

[left] 
path=c:\Windows\System32\ 
ViewMode=4 
activepanelcolor=16579817 
activepanelcolor2=16381121 
ShowAllDetails=1 
SpecialView=0 
show=1 
sortorder=0 
negative Sortorder=0 

[right] 
path=c:\ 
ViewMode=0 
activepanelcolor=-1 
activepanelcolor2=-1 
ShowAllDetails=1 
SpecialView=0 
show=1 
sortorder=0 
negative Sortorder=0 

[ViewModes] 
0_name=<default> 
0_icon= 
0_options=-1|-1|0||-1|-1|-1 
1_name=1 
1_icon=shell32.dll,130 
1_options=-1|-1|0||16740378|16772332|16769505 
2_name=2 
2_icon=shell32.dll,24 
2_options=-1|-1|0||32768|15794160|14876641 
3_name=3 
3_icon=shell32.dll,220 
3_options=-1|-1|0||0|15724527|14079702 
4_name=4 
4_icon=shell32.dll,223 
4_options=-1|-1|0||16776960|16579817|16381121 

[lefttabs] 
0_path=c:\Windows\ 
0_options=1|0|0|0|0|0|0||16740378,16772332,16769505|1 
1_path=c:\Program Files\ 
1_options=1|0|0|0|0|0|0||32768,15794160,14876641|2 
2_path=c:\Program Files\Internet Explorer\ 
2_options=1|0|0|0|0|0|0||0,15724527,14079702|3 
activetab=3 
activetabcolor=16776960 
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2ts4242
This is intentional: When automatic view mode switching is enabled, TC will reload the view mode of the two active tabs when TC is launched, and of the inactive tabs which you switch to them.
Author of Total Commander
https://www.ghisler.com
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

I have applied some view modes to my locked tabs, i want these view modes to be permanent (for locked tabs) but with this bug these view modes will be lost one by one on each TC startup
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, that's not how auto view mode switching works. If you want permanent view modes for these tabs, just add view mode switch rules for them. I did that for one directory which I keep locked (with directory changes allowed) and which needs to be sorted by name. The advantage is that the view mode will change to your default view mode when you change directory on that tab, but will revert to the locked view mode when you return to the locked root.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ts4242
now the active tab lost its view mode
I agree with Christian here. The view isn't lost - it's just set to default view - which isn't easily recognizable in your sample ini.

2ghisler(Author)
For me the question here is if locked tabs should get a special treatment concerning the rules. I have a few locked tabs that have a specific icon (view mode defined) so I can recognize them faster. They all display their icon when I enter the tab root folder or one of its subfolders. But when I go a few level up the tab icon is gone. This is not a real problem as I'm still aware that I changed the path in this locked tab. The trouble starts when I move to another tab. In this case only the tab title helps but the icon (if any) is more confusing than it helps.

So maybe locking a tab could mean 'lock the current view mode'. What do you think? Other ideas to solve the mentioned problem?
Another advantage of this would be that I don't need to create an auto-switch rule.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

What about saving switch mode per tab, i suggest adding new entry to tab's context menu (under "Configure view modes") labeled e.g. "Auto switch mode", when opening new tab, inherit its state (checked/unchecked) from the global setting and save it with the other tab options in Wincmd.ini.

The global setting is still useful for those don't use tabs.

Advantages
- No need to define rule for each locked tab
- Simple and clean rules list.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

For me the question here is if locked tabs should get a special treatment concerning the rules.
I agree that this is a good idea for tabs of type "locked". But what about tabs with "locked but directory changes allowed"?
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

27.07.16 Added: Don't reset view mode when loading locked tabs (also with directory changes allowed) (32/64)
Can you give a few more details here. I couldn't find a change in behavior in a quick test.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

1. Set some view mode change rules
2. Lock some tabs
3. Set view modes manually for these tabs
4. Close TC
5. Re-open TC

TC6: It will revert to what the view mode change rules say when you switch to these locked tabs.

TC7: It will remember and use the view modes set in step 3.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I cannot confirm this behavior. It always seems to load the view mode from the rule.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Did you changed directory after setting the view mode in directory "locked but directory changes allowed"? This will lose the user-defined view mode.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Lefteous
Please give me step by step instructions and a test ini for your problem. I cannot reproduce what you write.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

This is what I did based on your step by step instructions above.

1. Start TC with this ini file.
2. In the current tab navigate to a folder that matches the name 'Total Commander'. The view mode 'New files' should be applied to this tab automatically.
3. Lock the tab (with or without directory changes allowed)
4. Change the view mode manually to 'Multimedia'
5. Close TC
6. Reopen TC

The tab is now set back to 'New files'.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ah, thanks, I can reproduce it now! Problem is that ViewMode=-1 is stored in the ini. I will fix it.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

07.08.16 Fixed: Locked tab: Keep view mode set by user also on active tab (it was preserved only on inactive tabs by mistake) (32/64)
Unfortunately I can still reproduce the problem in beta 9 using the exact same steps.
Post Reply