View Issue Details

IDProjectCategoryView StatusLast Update
0003941DraftBugpublic2019-05-09 14:07
ReporterjmaustpcAssigned Toyorik 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformamd 64bitOSKubuntuOS Version18.04 Python3
Product Version0.18 
Target Version0.18Fixed in Version 
Summary0003941: Draft WB Label bugs with Python 3
DescriptionDraft Label
https://forum.freecadweb.org/viewtopic.php?f=23&t=35780

some display issues,
  1. a "b" and inverted commas sounding the otherwise correct values
  2. displayed values not cleared when property changed unless it is over written
  3. an error message when "area" is selected when a label is attached to a solid

Steps To ReproduceDraft Label
https://forum.freecadweb.org/viewtopic.php?f=23&t=35780

1) I get a "b" before the value and the value within single inverted commas. For example, something like this b'1000.00mm'.

2) if I select a solid and then attach a Draft Label to it, the default in the dialogue is volume, if I change that to area I get an error

Pick text position:
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Draft/Draft.py", line 6407, in execute
    if "Face" in obj.Target[1][0]:
<class 'IndexError'>: list index out of range
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/Draft/Draft.py", line 6407, in execute
    if "Face" in obj.Target[1][0]:
<class 'IndexError'>: list index out of range


3) similar to 2) if you create the label with default "Volume" then after creation toggle the property to area in the property editor, you get the same error message above however it does actually correctly show the area despite the error message.

4)after creating a label, if you change the thing to display to something with nil value, it does not clear the previous values. Similarly if you select "Position" three values are shown, if you then select something with one value e.g. volume, it will display that Volume where X used to be but still leave Y and Z values from the previous use of "position".
Additional InformationInstalled from the Release PPA (Python3 version selected)

OS: Kubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
TagsNo tags attached.

Activities

jmaustpc

2019-04-22 15:00

manager  

draftlabelstestsonacube.FCStd (7,197 bytes)

Kunda1

2019-05-09 13:30

administrator   ~0013091

punting to yorik

yorik

2019-05-09 14:01

administrator   ~0013093

Fix committed to master branch.

yorik

2019-05-09 14:07

administrator   ~0013094

I fixed the two first issues (the "b" and the error), but not really sure how to cope with the problem of the value suddenly becoming null. Shoudl the label display something like <NULL VALUE>? or ### a la excel... Most other features in FreeCAD don't do that, they just don't update the shape, and mark the object as problematic in the tree. Maybe we should do that? But it might be a bit too much, not sure...

(BTW I'm trying to fix the github->mantis integration too... Almost working)

Related Changesets

FreeCAD: master 9e91c8d6

2019-05-09 10:48:04

yorik

Details Diff
Draft: Fixed py3 issues in Draft Label - fixes 0003941 Affected Issues
0003941
mod - src/Mod/Draft/Draft.py Diff File

Issue History

Date Modified Username Field Change
2019-04-22 15:00 jmaustpc New Issue
2019-04-22 15:00 jmaustpc Status new => assigned
2019-04-22 15:00 jmaustpc Assigned To => yorik
2019-04-22 15:00 jmaustpc File Added: draftlabelstestsonacube.FCStd
2019-05-09 13:30 Kunda1 Note Added: 0013091
2019-05-09 14:01 yorik Changeset attached => FreeCAD master 9e91c8d6
2019-05-09 14:01 yorik Note Added: 0013093
2019-05-09 14:01 yorik Status assigned => closed
2019-05-09 14:01 yorik Resolution open => fixed
2019-05-09 14:07 yorik Note Added: 0013094