QT5 file open/save dialogue with Alzheimers

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

QT5 file open/save dialogue with Alzheimers

Post by freman »

Hi,

I have just moved from a qt4 build to qt5. I am finding that the file open / save / saveAs / save-a-copy dialogues have near total amnesia.

If I open a file then go to File | SaveAs , I get neither the current filename nor the current path of that file displayed.

In this case I expect the filename to be filled with the current filename ( I'm most likely just going to add a suffix as a version or a backup rename ) and I'm most likely to want it in the same directory. If I want to save it elsewhere, I'm most likely to want to keep the filename intact and I do not want the possibility of a mis-type or have to go and find exactly what it is currently called and type it in by hand.

I never had this problem before where the names filled in and the drop down list of recently used directory paths was usually quite helpful.

The current default in the otherwise empty path list is the path of the /bin/FreeCAD executable , probably one of the last places I want to store my work !

File | Open seems to have a different memory . I'm not sure where this is useful since opening and saving would likely be in the same directory most of the time. It certainly exacerbates the lack of retention of recently used paths.

Every time I restart FreeCAD it seems to forget the little useful information I have managed to get into these path dropdown lists.

This is a real PITA since I'm for ever having to climb around the tree to get where I need to be for what should be such trivial operations.

My last qt4 was from Aug25 master. I never saw these issues on any qt4 build, so I'm suspecting it is qt5 related.

Also File | Recent files only seems to retain 4 entries, this is insufficient and means it is often not useful and I need to climbing around tree again just to find what I did 10min earlier. I don't see anywhere to configure the number entries and I think it previouslywent deeper.


OS: Fedora 31 (Thirty One) (LXDE/LXDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18754 (Git)
Build type: Release
Branch: master
Hash: a5019828cf263ccdec3b6885f845b1ab1c35ac11
Python version: 3.7.5
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)




PS If I open a file , then go to chose a font for a ShapeString, then come back to File | Open, it see /usr /usr/share/ /usr/share/fonts etc. and NOT the last place I opened a FC file !! It is unclear why there is a separate entry for each part of the path ( I have a template for the default font file, so I did not even walk that list of directories in getting there ).

I would suggest that font selection needs its own instance of the open file dlg that does not pollute the general file FC open/save mechanism. No one has work files there and usually this is a protected system path anyway.

These issue are probably pretty easy to fix and would make a world of difference to usability of the interface. There seems to be some regression here. Very frustrating.
Last edited by freman on Wed Nov 20, 2019 3:10 pm, edited 1 time in total.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: file open/save dialogue with Alzheimers

Post by DeepSOIC »

Try fiddling with DontUseNativeDialog preference:
https://forum.freecadweb.org/viewtopic. ... 84#p275295
chrisb
Veteran
Posts: 53928
Joined: Tue Mar 17, 2015 9:14 am

Re: file open/save dialogue with Alzheimers

Post by chrisb »

freman wrote: Tue Nov 19, 2019 9:19 am I have just moved from a qt4 build to qt5. I am finding that the file open / save / saveAs / save-a-copy dialogues have near total amnesia.
You may try the native file selection dialog, see the first linux entry in the known issues topic.

Edit: crosspost with DeepSOIC, but my link looks nicer 8-)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: file open/save dialogue with Alzheimers

Post by freman »

thanks both. I saw deep's link first and it brings up my system dlg which at least goes to the last used path and fills in filenames.

I have not fully tested but it seems way better already. Is there somewhere I can paste those lines to make them load automatically rather than needing to paste every startup?

TIA. Great support with great ideas ;)
Last edited by freman on Tue Nov 19, 2019 10:46 am, edited 1 time in total.
chrisb
Veteran
Posts: 53928
Joined: Tue Mar 17, 2015 9:14 am

Re: file open/save dialogue with Alzheimers

Post by chrisb »

You can configure it in the parameters.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: file open/save dialogue with Alzheimers

Post by freman »

ah thanks Chris. I had looked in Edit | Prefs earlier and did not find anything relevant. I was forgetting Tools | Prefs.

certainly flexible you just need to know where to look in the metric tonnes of prefs that are on offer.

Nice permanent fix.
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: file open/save dialogue with Alzheimers

Post by freman »

Tools | Edit Prefs | BaseApp | Prefs | Dialogs did not seem to work. I set this after doing the python paste and assumed it would stick.

Next time I open the setting is still "true" but I do not see by system dialogs but the FC ones.

For now it seems I need to paste python each time, rather tiresome.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: file open/save dialogue with Alzheimers

Post by DeepSOIC »

The console snippet modifies the preferences, same as doing it via edit->parameters. It should stick. There may be a weird interplay if you have multiple instances. So to be absolutely sure:
* close all FC instances but one
* run the snippet in the remaining instance
* close that last instance
now it should be written to the cfg file in the correct state.


freman wrote: Tue Nov 19, 2019 1:44 pm Next time I open the setting is still "true" but I do not see by system dialogs but the FC ones.
So it does stick, right? Maybe it's a bug somewhere...
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: file open/save dialogue with Alzheimers

Post by freman »

Just flipped it a couple of times and it seems good. I did have a crash earlier on closing FC, maybe that messed it up.
Also the double-negative "DontUseNativeDialog"=False is confusing. Why not "UseNativeDialog"=True :?

Anyway, both proposed methods seem to do the job. Thank to all.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: file open/save dialogue with Alzheimers

Post by Kunda1 »

OP please mark thread [Solved] if it is in fact Solved. Thanks
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply