Reset in preferences - what will it do?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
tonyaimer
Posts: 241
Joined: Mon Sep 30, 2019 4:17 pm

Reset in preferences - what will it do?

Post by tonyaimer »

OS: Linux Mint 20 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.25645 (Git) AppImage
Build type: Release
Branch: master
Hash: 37d9757399b4c2ec30318eb88d7cd7c508246345
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/South Africa (en_ZA)

I have messed up the toolbars in my present version of FreeCAD because I did not see the little row of dots very clearly
on my screen. Is there a way to make these dots more visible?

My other question is what "reset" will do in preferences. The button appears to be there for all the items that have options
that can be set. Does reset do all the items or do I need to go through each item in turn. Where will I reset the menus?

I do not want to click on reset if it is going to reset all the options in all the items until I know what it is going to do.

Perhaps I need to pre-record all the options I have changed from the default values?

I could rename the two configuration files and let FreeCAD recreate them itself but I do not know what that will do in terms of
my having messed up the toolbar menus.

Some advice and/or information would be very well received!

Regards

Tony Aimer
Last edited by tonyaimer on Fri Sep 24, 2021 6:17 pm, edited 2 times in total.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Reset in preferences - what will it do?

Post by GeneFC »

tonyaimer wrote: Wed Sep 22, 2021 3:57 pm My other question is what "reset" will do in preferences.
By design this action takes the preferences back to the level of a totally new installation.

However, it does not really work that way in practice. I just ran a test, first saving my existing user.cfg, and about half of the preferences were wiped out. I did not check carefully, but I suspect that the core preferences are reset, but a lot of the preferences for extra workbenches and the like are not found or reset.

You can run the same test for yourself to see what happens. You will *definitely* lose some preferences, so be sure to make a backup first.

Gene
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Reset in preferences - what will it do?

Post by TheMarkster »

Here is the c++ code that gets executed after you click ok to go ahead with the reset:

Code: Select all

   if (box.exec() == QMessageBox::Yes) {
        // keep this parameter
        bool saveParameter = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
                              GetBool("SaveUserParameter", true);

        ParameterManager* mgr = App::GetApplication().GetParameterSet("User parameter");
        mgr->Clear();

        App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
                              SetBool("SaveUserParameter", saveParameter);
As I understand it, "User parameter" is the top-level group object in edit parameters dialog. Everything below that (baseapp, plugins, and tux) is probably zapped with the ominous-looking call to mgr->Clear(). Only the one boolean parameter called BaseApp/Preferences/General/SaveUserParameter is saved and restored after the call to Clear().

But keep in mind FreeCAD is still running when you do this. I suppose it is possible some settings currently residing in memory could get saved back to parameters as part of the normal program flow or during FreeCAD exit. Surest way is to open the config file folder, exit FreeCAD, rename those files, and restart FreeCAD. This resets everything with a clean slate. If it doesn't fix the problem, exit FreeCAD again, delete the new files and rename the old ones back.
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Reset in preferences - what will it do?

Post by chrisb »

Not everything is stored in user.cfg. Information about toolbars is stored in $HOME/.config/FreeCAD/FreeCAD.conf.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
tonyaimer
Posts: 241
Joined: Mon Sep 30, 2019 4:17 pm

Re: Reset in preferences - what will it do?

Post by tonyaimer »

Based on chrisb's excellent in formation I found freecad.cfg and renamed it to freecad1.cfg

I did the same to user.cfg and system.cfg

I then restarted FreeCAD 20 and lo and behold the tool-bars are reset and none of my other
preferences seem to have been reset.

Thanks Chris

Regards

Tony Aimer
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Reset in preferences - what will it do?

Post by TheMarkster »

chrisb wrote: Wed Sep 22, 2021 9:54 pm Not everything is stored in user.cfg. Information about toolbars is stored in $HOME/.config/FreeCAD/FreeCAD.conf.
Do you know if there is a similar file in Windows? I see the .config folder, but nothing related to FreeCAD in it.
tonyaimer
Posts: 241
Joined: Mon Sep 30, 2019 4:17 pm

Re: [All good now] Reset in preferences - what will it do?

Post by tonyaimer »

Further to my previous post I found the sketcher tool-bars still messed up so I did reset
on the preferences with the sketcher icon in the left hand column selected.

So I have not yet found out how to sort these toolbars out.

Tony Aimer
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Reset in preferences - what will it do?

Post by Syres »

TheMarkster wrote: Fri Sep 24, 2021 6:10 pm Do you know if there is a similar file in Windows? I see the .config folder, but nothing related to FreeCAD in it.
I've not got the key to hand but I believe the equivalent is held in the registry.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Reset in preferences - what will it do?

Post by GeneFC »

There is nothing in Windows related to configution of FreeCAD outside of the user.cfg and system.cfg files in the Users folder. The only thing in the registry other than shortcuts is a tiny amount placed by QT relating to FreeCAD window positions.

I see a .config folder once in a while after installing something, but never related to FreeCAD.

My user.cfg file has lots of stuff about toolbars included inside.

Gene
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Reset in preferences - what will it do?

Post by chrisb »

I don't know much more than I posted above.

Would it be helpful/sensible to add a symbolic link to this file in the ~/.FreeCAD folder?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply