Draft grid stays in other workbenches

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!
drmacro
Veteran
Posts: 8980
Joined: Sun Mar 02, 2014 4:35 pm

Draft grid stays in other workbenches

Post by drmacro »

Is there a way to get the draft grid to go away when you switch to another workbench?

I always end up having to go back to click it off... :(
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Draft grid stays in other workbenches

Post by vocx »

drmacro wrote: Tue Jul 14, 2020 7:02 pm Is there a way to get the draft grid to go away when you switch to another workbench?
You could add a shortcut to a custom button that just runs this command.

Code: Select all

Gui.runCommand("Draft_ToggleGrid")
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.
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Post by chrisb »

After quite some trials to handle this grid I decided to switch it off completely by unchecking "Use grid" in the Draft preferences. This has the drawback that just in case I want to use it, I have to change the preferences first.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Veteran
Posts: 8980
Joined: Sun Mar 02, 2014 4:35 pm

Re: Draft grid stays in other workbenches

Post by drmacro »

chrisb wrote: Tue Jul 14, 2020 9:38 pm After quite some trials to handle this grid I decided to switch it off completely by unchecking "Use grid" in the Draft preferences. This has the drawback that just in case I want to use it, I have to change the preferences first.
AH! Good to know that it can be turned off...I learn a new nook and cranny of FC every day. :D
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Post by chrisb »

drmacro wrote: Tue Jul 14, 2020 10:23 pm Good to know that it can be turned off...I learn a new nook and cranny of FC every day. :D
It was the last resort. I would have liked to keep it, because it comes handy, but I don't work much in Draft; so it was annoying that I always had to switch back to Draft, to switch it off.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Draft grid stays in other workbenches

Post by TheMarkster »

chrisb wrote: Tue Jul 14, 2020 11:35 pm I would have liked to keep it, because it comes handy, but I don't work much in Draft; so it was annoying that I always had to switch back to Draft, to switch it off.
Same here.
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Post by chrisb »

There is already a ticket: issue #3817. Please check if the planned behaviour is ok.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Post by chrisb »

I have thought for a while about the grid behaviour and I think there shouldn't be a "Use grid" checkbox at all, or to be more precise: it shouldn't be necessary to have such a toggle: If a user eplicitely clicks the grid button, then it should of course be shown. If he doesn't like it he should not click it.

Currently this checkbox is only needed because otherwise the grid pops up unexpectedly. I think it is sufficient to have the first two points described by Yorik in the ticket:
If Draft -> Use grid is on and always use grid is on:
- Show the grid on entering Draft, keep the grid on leaving Draft

If Draft -> Use grid is on and always use grid is off:
- Do not show the grid on entering Draft, hide the grid on leaving Draft
Then the "Use grid" checkbox could be omitted.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Draft grid stays in other workbenches

Post by GeneFC »

I have thought about this a few times over the years, and I have a question.

Does a workbench know when if has been "left" in favor of another workbench? I would guess not. Unlike closing a program there would seem to be no need for any finalizing operations when one switches workbenches.

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

Re: Draft grid stays in other workbenches

Post by TheMarkster »

GeneFC wrote: Wed Jul 15, 2020 4:24 pm I have thought about this a few times over the years, and I have a question.

Does a workbench know when if has been "left" in favor of another workbench? I would guess not. Unlike closing a program there would seem to be no need for any finalizing operations when one switches workbenches.

Gene
Yes, there is a way for a workbench to know the user has left it. I use this in DynamicData and in ThreadProfile to move the toolbar to the new workbench (which the user can disable if preferred).
Post Reply