To reproduce:
1. Open TC with a clean ini file
2. Make 3 color assignments in "Define colors by file type" which are easy to tell apart (e.g. green, blue and orange), see: https://madsenworld.dk/tcmd/definecolors1.png
3. Click the "Dark <-> Normal" button and edit the dark colors so they are also easy to tell apart, see: https://madsenworld.dk/tcmd/definecolors2.png
4. Click the "Dark <-> Normal" button again to go back to Normal mode setting.
5. Place the cursor on the first item in the list.
6. Click "Add" and define a 4th color (purple), see: https://madsenworld.dk/tcmd/definecolors3.png
7. Click the "Dark <-> Normal" button again to go to Dark mode setting.
6. The new item is now placed as the second item (as expected), but the third item still has the color it had before (orange) and is now assigned to the *.blue file type, and the file type *.orange is deleted, see: https://madsenworld.dk/tcmd/definecolors4.png
Only if you place the cursor on the last item before you click the "Add" button, the added filetype is inserted correctly without messing up the already defined definitions for dark mode.
You can skip step 4. here above, so you are in Dark mode setting when adding the new item - the new item is still not inserted corretcly in Dark mode - but it is actually correctly inserted in the Normal mode setting.
If there are more than 3 types defined, then all the color definitions after the place where the new definition is added gets shifted and the last item is deleted.
[solved] TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
Moderators: Hacker, petermad, Stefan2, white
[solved] TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
Last edited by petermad on 2019-12-18, 21:31 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
No, the entry is in fourth place in your picture.petermad wrote: 2019-12-14, 14:11 UTC the file type *.orange is deleted, see: https://madsenworld.dk/tcmd/definecolors4.png
You can hardly see him because there is black writing on an almost black background.
Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
By Jove, you are rightYou can hardly see him because there is black writing on an almost black background.

So the file type entries are moved correctly down the line, but the colors are not moved with them - so the last item ends up not having a color from before adding the new item, and then TC apparantly choses to assign black to the item.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
Confirmed.petermad wrote: 2019-12-14, 19:06 UTC So the file type entries are moved correctly down the line, but the colors are not moved with them - so the last item ends up not having a color from before adding the new item, and then TC apparantly choses to assign black to the item.
Color assignment of line 2 (where the new line is inserted) is lost and set to approximately white (RGB 255/229/255).
Line 2=>3 ("blue") gets darkmode-color of former line 3 (orange)
line 3=>4 ("orange") gets darkmode-color of previously non-existing line 4 (so it's black=0).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
Confirmed, I didn't move the colors for dark mode down when adding a new entry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: TC 9.5b9 - Adding colors in "Define colors by filetype" works incorrectly for Dark mode
Confirmed fixed in TC 9.5b10 

License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar