Save file sort parameters between sessions

More
28 Oct 2021 11:59 #224569 by rodw
Someone flagged this to me in relation to QTPlasmac but I think it belongs here.
He was frustrated because every time he opened the the file dialog window to select a new file, he had to change the sort order so files were listed in date/time descending order.
This is always how I used to have my system set up.

I think this is the relevant line of code and I wondered if the numeric number was the column number for sort
github.com/LinuxCNC/linuxcnc/blob/master...file_manager.py#L116

So is it possible to save the user selected sort order between sessions (and file opens)?

Please Log in or Create an account to join the conversation.

More
28 Oct 2021 19:54 #224607 by cmorley
It is possible just not coded yet. I'll add it to my todo list.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
29 Oct 2021 07:31 #224632 by rodw
Thanks Chris.

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 03:24 #224746 by cmorley
Ok should work in master now.
let me know when you get a chance please.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 12:45 #224762 by snowgoer540

Ok should work in master now.
let me know when you get a chance please.


Sorry to report that this does not work over here on QtPlasmaC with the latest pull.

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 12:52 - 31 Oct 2021 13:07 #224763 by snowgoer540
It seems that no matter what, on each restart (of LCNC), the following are always "None":
sect = self.SETTINGS_.value('sortIndicatorSection')
order = self.SETTINGS_.value('sortIndicatorOrder')

Although they are being assigned a value when they are getting set during the cleanup.

Also, if I hard code them (3 and 1 for date and descending), then it does work. So it's something with storing or recalling the setting.
Last edit: 31 Oct 2021 13:07 by snowgoer540.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 12:56 #224765 by rodw

Ok should work in master now.
let me know when you get a chance please.

This seems to work in QTplasmac thanks Chris, Is there a way that the state of the sort order between sessions eg. after linuxcnc is closed and reopened.

eg. Does pycvp save data in a preferences file?

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 16:29 #224779 by cmorley
What version of Qt are you using (or what version of linux).
It works for me with mint 20 qt 5.12.8

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 18:04 #224783 by snowgoer540
MX Linux 19.2 on my machine, and I am not sure how where to see the QT version, but in designer it says it uses qt version 5.11.3

Please Log in or Create an account to join the conversation.

More
31 Oct 2021 19:47 #224787 by snowgoer540
other is a mx linux 19.4 with fresh upgrades, also says 5.11.3...

Is using the preferences file an option?

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.075 seconds
Powered by Kunena Forum