How to Make Toolbars Stay Where I Put Them?

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!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

How to Make Toolbars Stay Where I Put Them?

Post by bejant »

When I start FreeCAD and switch to the Part Design workbench, the Sketcher Constraint toolbar is not fully visible so I move it (sometimes I move the Sketcher Geometry toolbar too) to make the whole toolbar visible. When I close FreeCAD and start it later, the toolbars are back where they originally were instead of where I moved them. So, how can I get them to stay put instead of having to move them every time I go into FreeCAD? It's probably something simple that I'm missing here...

Toolbars in their original places every time I start FreeCAD:
Image

Toolbars after I move them and where I would like them to stay:
Image

OS: Windows XP
Platform: 32-bit
Version: 0.14.2192 (Git)
Branch: master
Hash: b63f9d7a2b440e1363508976ec105dac31d7f698
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: How to Make Toolbars Stay Where I Put Them?

Post by wmayer »

When closing FreeCAD we store the current layout (the positions of tool bars and dock windows) to the registry. With the next start we read in these settings from the registry and try to restore the layout. However, if your startup workbench is neither the Sketcher nor Part design workbench this doesn't work because restoring the layout of a non-existent tool bar is not possible.

So, you have to make one the workbenches your default one.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to Make Toolbars Stay Where I Put Them?

Post by bejant »

Thanks!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: How to Make Toolbars Stay Where I Put Them?

Post by triplus »

Yes, currently you can only customize position of toolbars from default workbench (workbench you selected to start by default in preferences). All other workbenches won't save that custom layout and it will be lost after FreeCAD restarts.

I thought it was "Linux" related but now i see it's "cross-platform" feature. ;)
nahshon
Posts: 225
Joined: Wed Jul 24, 2013 8:06 pm

Re: How to Make Toolbars Stay Where I Put Them?

Post by nahshon »

I think each workbench should be responsible for placing its toolbars when activated.

Possibly related issue. Settings for a workbench are not present in the settings dialog until the first time that workbench was activated.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: How to Make Toolbars Stay Where I Put Them?

Post by wmayer »

I think each workbench should be responsible for placing its toolbars when activated.
A couple of years ago we had implemented this but it led to a lot of problems. Over time the data written to the registry get corrupted and Qt created some strange phantom widgets when reading back these data and also totally misplaced the tool bars. And also the memory consumption went up noticeably. That's why we limited it to restore the layout only at startup.
oldestfox
Posts: 98
Joined: Sun Jun 30, 2013 2:15 pm
Location: Southeast Texas, USA

Re: How to Make Toolbars Stay Where I Put Them?

Post by oldestfox »

wmayer wrote:Over time the data written to the registry
Is this the MS Windows OS registry?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: How to Make Toolbars Stay Where I Put Them?

Post by wmayer »

Yes, it's handled by the Qt class QSettings.
User avatar
derei
Posts: 59
Joined: Thu Dec 17, 2015 7:10 pm
Contact:

Re: How to Make Toolbars Stay Where I Put Them?

Post by derei »

Why don't you use some .ini files where to store the position and order for the toolbars?

Each workbench should have its own .ini file that is read at the moment where a workbench is selected. This way, the startup workbench would arrange itself on load and other workbenches would also arrange themselves whenever one of them is selected from the list.
I know it sounds easy talking and the reality is most of the time different, but storing settings in a file that gets rewritten if one wants to save the toolbars (you just can add a Save Workspace Layout menu entry), will avoid getting registry messed-up.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: How to Make Toolbars Stay Where I Put Them?

Post by triplus »

I did some experiments with this in the past (TabBar) and store/restore issue probably could be resolved. But after that there are other issues involved and all sorts of unwanted side effects start to prevent good end user experience.

Therefore for whoever tackles this it will represent a challenge. But then again if it wouldn't represent a challenge it would probably be resolved by now. ;)
Post Reply