cm_rereadsource & Selected files
Moderators: Hacker, petermad, Stefan2, white
cm_rereadsource & Selected files
Hi, if i use cm_rereadsource on a panel with several files selected Tc don't
unmark them, but when i use cm_rereadsource 1 then selected files are
unmarked, may you consider a new option like cm_rereadsource 4
that force a refresh but without unmarking any file ?, thanks
Re: cm_rereadsource & Selected files
What is important, the selection is not only reset, but also not restored. A bug?
Code: Select all
cm_RereadSource 1,cm_RestoreSelection
Overquoting is evil! 👎
Re: cm_rereadsource & Selected files
2Galizza
You can do this: cm_SaveSelection,cm_RereadSource 1,cm_RestoreSelection.
You can do this: cm_SaveSelection,cm_RereadSource 1,cm_RestoreSelection.
Re: cm_rereadsource & Selected files
Thank yousa16 wrote: 2022-09-15, 16:33 UTC You can do this: cm_SaveSelection,cm_RereadSource 1,cm_RestoreSelection.
2Fla$her
Let's see if is it considered as a bug, thanks
Re: cm_rereadsource & Selected files
Then TC detected nothing had changed in that folder and didn't do a refresh.Galizza wrote: 2022-09-15, 14:33 UTC Hi, if i use cm_rereadsource on a panel with several files selected Tc don't unmark them..
In this case you forced a refresh and the selected files are unmarked.Galizza wrote: 2022-09-15, 14:33 UTC ..but when i use cm_rereadsource 1 then selected files are unmarked
Yes, I believe there is one.Fla$her wrote: 2022-09-15, 16:00 UTC What is important, the selection is not only reset, but also not restored. A bug?Code: Select all
cm_RereadSource 1,cm_RestoreSelection
Apparently Auto-Refresh when activating the program does save the selection, but a manual refresh doesn't save the selection.
- Mark files 1, 2 and 3
- Press CTRL+NUM - (deselect all) (selection is stored implicitly)
- Mark files 4, 5 and 6
- Execute cm_RereadSource 1
- Press NUM / (restore selection)
If you can't restore the last selection after a refresh, it's weird for the user that an earlier selection is restored instead.
Auto-Refresh when the file system changes - Selection is not lost.
Auto-Refresh when activating the program - Selection is lost but saved.
Manual Refresh - Selection is lost and not saved.
Moderator message from: white » 2022-09-16, 09:44 UTC
Moved to bugs forum.
Re: cm_rereadsource & Selected files
2white
Try and replace Execute cm_RereadSource 1 in your example above with: cm_ShrinkSelection - same outcome.
This is a false assumption, the selection is only saved if some sort of action takes place that clears the list. Such an action could be pressing Ctrl+NUM - (but not pressing NUM- -> * -> Enter (cm_ShrinkSelection) for some reason).Press CTRL+NUM - (deselect all) (selection is stored implicitly)
Try and replace Execute cm_RereadSource 1 in your example above with: cm_ShrinkSelection - same outcome.
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: cm_rereadsource & Selected files
2ghisler(Author)
What is the reason for moving the topic? It would be logical to fix it.
What is the reason for moving the topic? It would be logical to fix it.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cm_rereadsource & Selected files
cm_rereadsource does nothing if it detects that the folder wasn't changed. Therefore the selection is preserved. However, if something changes, or you force a refresh via cm_rereadsource 1, then the current file list is removed and replaced by the new one read by cm_rereadsource. This also removes the current selection.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: cm_rereadsource & Selected files
Where does he get this new list from? And why did you need to do this? What's the point of deleting a list from memory?ghisler(Author) wrote: 2022-10-03, 08:03 UTCthen the current file list is removed and replaced by the new one read by cm_rereadsource.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cm_rereadsource & Selected files
cm_rereadsource reads the file list of the current directory, then checks if its checksum is the same as that of the currently displayed list. If they are the same, the displayed list isn't refreshed to avoid flickering. If they not the same, the old list is discarded and the new one is shown.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: cm_rereadsource & Selected files
2ghisler(Author)
Please read the thread again. From second post onwards it's about not being able to restore the selection.
Please read the thread again. From second post onwards it's about not being able to restore the selection.
white wrote: 2022-09-16, 10:11 UTC Apparently Auto-Refresh when activating the program does save the selection, but a manual refresh doesn't save the selection.Now files 1, 2 and 3 are marked.
- Mark files 1, 2 and 3
- Press CTRL+NUM - (deselect all) (selection is stored implicitly)
- Mark files 4, 5 and 6
- Execute cm_RereadSource 1
- Press NUM / (restore selection)
If you can't restore the last selection after a refresh, it's weird for the user that an earlier selection is restored instead.
Auto-Refresh when the file system changes - Selection is not lost.
Auto-Refresh when activating the program - Selection is lost but saved.
Manual Refresh - Selection is lost and not saved.
Re: cm_rereadsource & Selected files
2ghisler(Author)
Yes, yes. It's not about resetting the list, but about what I wrote:
Yes, yes. It's not about resetting the list, but about what I wrote:
Fla$her wrote: 2022-09-15, 16:00 UTCWhat is important, the selection is not only reset, but also not restored.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cm_rereadsource & Selected files
cm_RestoreSelection only works when the previous selection was stored, which only happens in file operations, e.g. when you copy something and the selection gets removed. That's why you have to call
cm_SaveSelection,cm_RereadSource 1,cm_RestoreSelection
cm_SaveSelection,cm_RereadSource 1,cm_RestoreSelection
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: cm_rereadsource & Selected files
When we execute cm_RereadSource, the panel is redrawn, this can be seen by tabs. The selection is not lost.
If we remove the selection by Ctrl + [-], then we can easily return it by pressing [/].
Why does resetting the allocation by hotkey not delete the allocation list from memory, but the one called by cm_RereadSource 1 does? Why can't you get rid of it?
If we remove the selection by Ctrl + [-], then we can easily return it by pressing [/].
Why does resetting the allocation by hotkey not delete the allocation list from memory, but the one called by cm_RereadSource 1 does? Why can't you get rid of it?
Overquoting is evil! 👎
Re: cm_rereadsource & Selected files
Not true, as I just mentioned above:ghisler(Author) wrote: 2022-10-04, 08:36 UTC cm_RestoreSelection only works when the previous selection was stored, which only happens in file operations, e.g. when you copy something and the selection gets removed.
It's like petermad says:white wrote: 2022-09-16, 10:11 UTC Auto-Refresh when activating the program - Selection is lost but saved.
Manual refresh is an exception causing confusing behavior:petermad wrote: 2022-09-17, 13:27 UTC .. the selection is only saved if some sort of action takes place that clears the list. Such an action could be pressing Ctrl+NUM -
white wrote: 2022-09-16, 10:11 UTC If you can't restore the last selection after a refresh, it's weird for the user that an earlier selection is restored instead.