[FIXED] Dimensions repeat their Arbitrary labels

Discussions about the development of the TechDraw workbench
aapo
Posts: 103
Joined: Mon Oct 29, 2018 6:41 pm

[FIXED] Dimensions repeat their Arbitrary labels

Postby aapo » Thu Oct 17, 2019 1:12 pm

Hi!

I noticed that whenever I change a dimension format to "Arbitrary" in a recent TechDraw version, the text entered into the Format Spec box repeats twice. Also, setting "Arbitrary" to false causes any other characters than the numeric value (e.g., "%g") to have no effect, i.e., only the raw number is shown in the actual dimension. I also get a lot of warnings, even though the there is a format specifier in Dimension001, and the number actually shows in the dimension:

Code: Select all

Warning - no numeric format in formatSpec - Dimension001
20191017-TechDraw-dimension-arbitrary-repeats-pic01.png
20191017-TechDraw-dimension-arbitrary-repeats-pic01.png (33.01 KiB) Viewed 674 times
20191017-TechDraw-dimension-arbitrary-repeats-pic02.png
20191017-TechDraw-dimension-arbitrary-repeats-pic02.png (41.5 KiB) Viewed 674 times

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18542 (Git)
Build type: Release
Branch: master
Hash: 432d4f25528300d0febf53b85df578fcdde1eda7
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Last edited by aapo on Sun Oct 20, 2019 9:53 pm, edited 1 time in total.
Syres
Posts: 645
Joined: Thu Aug 09, 2018 11:14 am

Re: [Bug?] Dimensions repeat their Arbitrary labels

Postby Syres » Thu Oct 17, 2019 3:45 pm

Confirmed using (and later builds):

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18516 (Git)
Build type: Release
Branch: master
Hash: 867a09f731926bf75695e8a6f063cbc9c1033b40
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

Last correct working build was:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18504 (Git)
Build type: Release
Branch: master
Hash: f66023a646db4b2502bb3637897443b3525ca3c7
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

therefore it is possible that commit https://github.com/FreeCAD/FreeCAD/commit/90fad81 may have caused the regression.
User avatar
wandererfan
Posts: 3862
Joined: Tue Nov 06, 2012 5:42 pm

Re: [Bug?] Dimensions repeat their Arbitrary labels

Postby wandererfan » Fri Oct 18, 2019 2:00 pm

should be fixed by git commit a1de871e93
aapo
Posts: 103
Joined: Mon Oct 29, 2018 6:41 pm

Re: [Bug?] Dimensions repeat their Arbitrary labels

Postby aapo » Sat Oct 19, 2019 7:38 pm

wandererfan wrote:
Fri Oct 18, 2019 2:00 pm
should be fixed by git commit a1de871e93
Thanks! This indeed fixes the bug with Arbitrary labels, the word "Text" in the screenshot below with build 18567 is shown only once, as it should. However, the smaller bug with formatted labels still exists with the latest master, which has your patch. If I put a Format Spec value of

Code: Select all

(%.2f) x2
to the dimension, the result is shown in the screenshot below. Note that the value "10.00" shows in place of %.2f, but the braces and the text "x2" are not shown. Sometimes I use braces around helper dimensions in order to indicate that these are secondary dimensions, which can be calculated from other dimensions.

Screenshot_20191019_222534.png
Screenshot_20191019_222534.png (42.17 KiB) Viewed 587 times


OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18567 (Git)
Build type: Release
Branch: master
Hash: f8f52e6fcfd40ae6187fc5d4f883ffb3f747f3ef
Python version: 2.7.17rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
aapo
Posts: 103
Joined: Mon Oct 29, 2018 6:41 pm

Re: [Bug?] Dimensions repeat their Arbitrary labels

Postby aapo » Sun Oct 20, 2019 9:51 pm

Now it works for me, after I compiled the very latest master. Apparently you had committed a new patch today, which solves the problem for builds larger than 18590. Thanks! :)

Screenshot_20191021_004701.png
Screenshot_20191021_004701.png (35.38 KiB) Viewed 535 times

OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18591 (Git)
Build type: Release
Branch: master
Hash: c6cd65916caf466ba174aa09044c96a20790a72f
Python version: 2.7.17rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
User avatar
wandererfan
Posts: 3862
Joined: Tue Nov 06, 2012 5:42 pm

Re: [Bug?] Dimensions repeat their Arbitrary labels

Postby wandererfan » Sun Oct 20, 2019 11:05 pm

aapo wrote:
Sun Oct 20, 2019 9:51 pm
Now it works for me, after I compiled the very latest master. Apparently you had committed a new patch today, which solves the problem for builds larger than 18590. Thanks! :)
Just sat down to put out a notice, but you beat me to it. Thanks for testing!