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
Posts: 2329
Joined: Sun Mar 02, 2014 4:35 pm

Draft grid stays in other workbenches

Postby drmacro » 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?

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."

My beginners, written treatise: Learning FreeCAD
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: Draft grid stays in other workbenches

Postby vocx » Tue Jul 14, 2020 8:15 pm

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
Posts: 30660
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Postby chrisb » 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.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Posts: 2329
Joined: Sun Mar 02, 2014 4:35 pm

Re: Draft grid stays in other workbenches

Postby drmacro » Tue Jul 14, 2020 10:23 pm

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."

My beginners, written treatise: Learning FreeCAD
chrisb
Posts: 30660
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Postby chrisb » Tue Jul 14, 2020 11:35 pm

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.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
TheMarkster
Posts: 2059
Joined: Thu Apr 05, 2018 1:53 am

Re: Draft grid stays in other workbenches

Postby TheMarkster » Wed Jul 15, 2020 3:21 am

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.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
chrisb
Posts: 30660
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Postby chrisb » Wed Jul 15, 2020 5:42 am

There is already a ticket: issue #3817. Please check if the planned behaviour is ok.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Posts: 30660
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft grid stays in other workbenches

Postby chrisb » Wed Jul 15, 2020 5:53 am

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.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Posts: 1789
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Draft grid stays in other workbenches

Postby GeneFC » 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
TheMarkster
Posts: 2059
Joined: Thu Apr 05, 2018 1:53 am

Re: Draft grid stays in other workbenches

Postby TheMarkster » Wed Jul 15, 2020 6:07 pm

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).
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
cron