ContentSendStateInformation refresh not handled properly

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

ContentSendStateInformation refresh not handled properly

Post by *Lefteous »

When ContentSendStateInformation state is set to refresh_pressed nothing else is called after ContentSendStateInformation. But when I click into the filelist panel TC calls ContentGetValue.

Expected: TC should rerequest all values by calling ContentGetValue for all files in the current view.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If I remember correctly, I had tried that, but quickly removed it because TC became unusable (the plugins would have to reload all the values every time there is a refresh). Maybe you have an idea how to solve this without slowing down TC to a crawl.
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 »

the plugins would have to reload all the values every time there is a refresh
This applies to contst_readnewdir but not to contst_refreshpressed.
plug-in sdk wrote:contst_readnewdir: It is called when TC reads one of the file lists.
contst_refreshpressed: The user has pressed F2 or Ctrl+R to force a reload.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You are right, I will try to make this distinction.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm currently trying to reproduce this error, but unfortunately I can't. When (in which situation) do you get this problem? I checked my code, I'm clearing all custom column fields when the user presses F2 or Ctrl+R, or send cm_rereadsource...
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 »

When (in which situation) do you get this problem?
Try this:
1) Setup a column view with [dirsizecalc.Size]
2) Create a directory which contains a file.
3) Go one dir up to display the directory size.
4) Reenter the directory and delete the file.
5) Go one dir up again.
6) Press Ctrl+R
7) The directory size display hasn't been updated (should show empty).
8) Press tab or click into the opposite file panel --> value is refreshed.

ContentGetValue should be called after the refresh not after changing the file panel focus.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I will try that! It sounds like the fields are cleared, but only reloaded when the corresponding line is redrawn...
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 »

Fixed in Total Commander 7.03. Thank you! :-)
Post Reply