[ Bug ] Sketcher: Problem with Grid size preference

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!
Post Reply
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

[ Bug ] Sketcher: Problem with Grid size preference

Post by Roy_043 »

There is a problem with the Sketcher Grid size preference in V0.20:
  1. Start FreeCAD without user.cfg.
  2. Activate the Sketcher WB.
  3. Call Std_DlgPreferences.
  4. Change the Sketcher Grid size preference to 20 mm.
  5. Press OK.
  6. Start a new document.
  7. Start a new sketch.
  8. Close the sketch.
  9. Check the Grid Size property of the sketch.
  10. Result: 10 mm.
The problem does not occur in V0.19: there the Grid Size property of the sketch is 20 mm.
And in V0.20 the problem persists even after a restart.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.28857 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by Roy_043 »

Confirmed:
https://forum.freecadweb.org/viewtopic.php?f=3&t=68724

Issue:
https://github.com/FreeCAD/FreeCAD/issues/6890

Maybe this should be labeled for V0.20? But I do not know how to do that.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by openBrain »

As there seems to have several issue with saving quantity values, I wonder if this can be due to git commit 8b33a70513.
Will try to investigate later.
Ping @wmayer
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by Roy_043 »

I noticed a "GridSize_History" group is created for this preference. Why is that?
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by openBrain »

Roy_043 wrote: Mon May 16, 2022 6:55 am I noticed a "GridSize_History" group is created for this preference. Why is that?
IIRC, with PrefQuantitySpinBox, you get a short history when you right-click the box so you can reset easily to a former value. ;)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by Roy_043 »

Thanks, yes it does work that way.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by wmayer »

openBrain wrote: Mon May 16, 2022 6:44 am I wonder if this can be due to git commit 8b33a70513.
Yes, it's caused by this change. However, the PrefQuantitySpinBox did it wrong all the time because it didn't use the actually set entry name but used Hist0. If you look at the .ui file you will see that the name is GridSize but in the code Hist0 was used.

git commit 57fcdd8182
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Sketcher: Problem with Grid size preference

Post by Roy_043 »

Thanks for the fix.
Post Reply