Hide Draft Working Plane Toolbar?

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
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Hide Draft Working Plane Toolbar?

Post by wandererfan »

Can somebody please remind me how to get rid of the Draft Working Plane Toolbar when I'm not in Draft? It seems to be glued to my screen.
DraftToolBar.png
DraftToolBar.png (15.67 KiB) Viewed 1643 times
Thanks,
wf
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Hide Draft Working Plane Toolbar?

Post by GeneFC »

The usual method is right click in the toolbar area and de-select (uncheck) the unwanted toolbar. If that does not work, ? ? ? ?

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

Re: Hide Draft Working Plane Toolbar?

Post by triplus »

Some insight. This specific toolbar (and snap related toolbar) has its own "show/hide" logic implemented. I guess due to the fact it is created directly from Python:

https://forum.freecadweb.org/viewtopic.php?f=8&t=13509

This should hide it:

Code: Select all

FreeCADGui.draftToolBar.Deactivated()
But all in all that should happen automatically when you deactivate the Draft workbench. And that does happen on my side. But i have seen on some end user screenshots in the past that the toolbar persist. Therefore it would be interesting to see why it doesn't get deactivated on some systems and it does on other. Is there any special procedure involved on how to make it persistent?
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Hide Draft Working Plane Toolbar?

Post by vocx »

triplus wrote: Mon Oct 22, 2018 1:03 am ...
This should hide it:

Code: Select all

FreeCADGui.draftToolBar.Deactivated()
...
I can confirm @wandererfan's bug.
FreeCad_Draft_toolbar_utilities.png
FreeCad_Draft_toolbar_utilities.png (140.6 KiB) Viewed 1618 times
The only toolbar in that image is Python console.

You can show and hide the Draft toolbar with

Code: Select all

FreeCADGui.draftToolBar.Activated()
FreeCADGui.draftToolBar.Deactivated()
Don't forget FreeCAD information. Maybe different Qt?

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14995 (Git)
Build type: Release
Branch: master
Hash: 7b866816785ac1ca9787b63d4bff12873bb3a593
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Last edited by vocx on Mon Oct 22, 2018 8:13 pm, edited 1 time in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Hide Draft Working Plane Toolbar?

Post by wandererfan »

vocx wrote: Mon Oct 22, 2018 5:53 am Don't forget FreeCAD information. Maybe different Qt?
Mea culpa. Toolbar is stuck on screen in v0.17 and in v0.18daily

OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)


OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14995 (Git)
Build type: Release
Branch: master
Hash: 7b866816785ac1ca9787b63d4bff12873bb3a593
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Hide Draft Working Plane Toolbar?

Post by triplus »

Hi @wandererfan

Can you test if you get the same behavior when using AppImage:

https://github.com/FreeCAD/FreeCAD/releases

P.S. If yes i guess i can test Linux Mint 18.3 Sylvia and see if i can reproduce the issue.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Hide Draft Working Plane Toolbar?

Post by yorik »

I have seen this behaviour as well, but couldn't really pinpoint the origin of the problem. I have the impression that the system that remembers the state of toolbars overrides the draft show/hide system...
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Hide Draft Working Plane Toolbar?

Post by wandererfan »

triplus wrote: Mon Oct 22, 2018 8:01 pm Can you test if you get the same behavior when using AppImage:
Same behaviour (I think). Toolbar was there when I started AppImage. Got rid of it with "FreeCADGui.draftToolBar.Deactivated()",
but after going into Draft then changing to Part, it was back again.

OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14995 (Git) AppImage
Build type: Release
Branch: master
Hash: 7b866816785ac1ca9787b63d4bff12873bb3a593
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Hide Draft Working Plane Toolbar?

Post by triplus »

OK i downloaded Linux Mint 18.3 "Sylvia" - Cinnamon and will do some tests tomorrow. In addition i was wondering did you always have this problem or it started to occur at some point after? One more thing you can try out is to first close FreeCAD and delete/move the files:

Code: Select all

./FreeCAD/user.cfg
./FreeCAD/system.cfg
./config/FreeCAD/FreeCAD.conf
After start FreeCAD and check if anything is different regarding the behavior of the mentioned toolbar. Don't use the code snippet this time at all. Just check what happens when going to Draft and after to Part workbench.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Hide Draft Working Plane Toolbar?

Post by vocx »

triplus wrote: Tue Oct 23, 2018 11:40 pm OK i downloaded Linux Mint 18.3 "Sylvia" - Cinnamon and will do some tests tomorrow. In addition i was wondering did you always have this problem or it started to occur at some point after?
I never noticed if this problem started at a certain point or not, as I never tried hiding all toolbars before. I only noticed when @wandererfan mentioned it.
One more thing you can try out is to first close FreeCAD and delete/move the files:

Code: Select all

./FreeCAD/user.cfg
./FreeCAD/system.cfg
./config/FreeCAD/FreeCAD.conf
After start FreeCAD and check if anything is different regarding the behavior of the mentioned toolbar. Don't use the code snippet this time at all. Just check what happens when going to Draft and after to Part workbench.
In my system, Ubuntu, this is the behavior I see.

I removed the above mentioned configuration files, then I started one of my model files, which has a few Arch Walls, and also one TechDraw page. The model opens and shows the TechDraw page, but the workbench is Start. Right clicking the area of the toolbars shows these active options: Combo view, File, Workbench, Macro, View, Structure, Navigation, and "Draft tray". This "Draft tray" toolbar is the one that has the Draft utilities, such as Working Plane, Line color, Line Thickness, Text size, Autogrouping, etc. I enabled and disabled this toolbar a few times and it did work without problems, although there is no message in the Python console or Report view.
Document that contains a TechDraw page
Document that contains a TechDraw page
FreeCad_Draft_draft_tray_toolbar_02.png (108.15 KiB) Viewed 1506 times
Document that does not contain a TechDraw page
Document that does not contain a TechDraw page
FreeCad_Draft_draft_tray_toolbar_01.png (100.78 KiB) Viewed 1506 times
Then I changed to the Arch workbench. Now, if I right click on the toolbar area, there is no more "Draft tray" option, only the other toolbars, "Arch tools", "Draft tools", "Draft mod tools", "Draft snap", etc. From now on, if I change to any workbench, and right click on the toolbar area, the "Draft tray" option is not available. The toolbar does appear automatically in Arch and in Draft, but there is no option to show it or hide it from the right click menu. Only the first time the document is opened is the "Draft tray" an option to enable or disable.

The "Draft tray" toolbar is hidden automatically in all workbenches except two, Arch and Draft. In these workbenches it's not possible to hide it. You can hide all toolbars except this one.

If I simply start FreeCAD, with no file loaded, then the program starts in the Start page, and the "Draft tray" option is not available. If I then open a model file, then right click the toolbars, the menu shows the "Draft tray" option. But again, the moment I switch to another workbench that is not Start, I no longer get the "Draft tray" option.

I then change the workbench to Draft. Then I close the opened file, that is, the TechDraw page, and the 3D model view, and I get back to the Start page. Then I switch back to the Start workbench. If I right-click in the toolbar area, it allows me to show the "Draft Snap" toolbar, even when there is no model opened. As a matter of fact, every time I switch to the Draft or Arch workbenches, and then back to the Start workbench, the right-click menu gives me the option of adding the "Draft Snap" toolbar, whether there is a model or not.
No model loaded, but with the Draft Snap toolbar
No model loaded, but with the Draft Snap toolbar
FreeCad_Draft_draft_tray_toolbar_03.png (96.45 KiB) Viewed 1506 times
Upon further review, there is no need to delete the configuration files user.cfg, system.cfg, FreeCAD.conf. This behavior is reproducible with new configuration files, or with old ones.

The "Draft tray" toolbar appears automatically upon startup with certain model files, but not with others. I'm not really sure what triggers this behavior. Those model files that have TechDraw pages usually show the "Draft tray" on loading. It sounds dumb, but it seems the difference between files showing the "Draft tray" from start, and those not showing it, is the presence of a backup file. That is, those models which have a *.fcstd1 or *.FCStd1 file tend to show the "Draft tray" automatically after being opened.
Attachments
wall_and_space.fcstd
(104.75 KiB) Downloaded 96 times
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply