FreeCAD: master 22e9cf89
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
vocx-fc | yorik | master | 2020-06-19 21:11:37 | master de6f251f |
Changeset | Draft: clean up ViewProviderText class Various improvements in style, PEP8, spacing, docstrings. The list of strings is set to empty before being assigned again. This solves a problem of the text not being updated correctly. In the past some `try-except` blocks were there to catch and ignore certain exceptions that apparently were caused by a race condition, where certain properties are not assigned to the object before they are used. These errors don't seem to occur in v0.19, so we removed the exception handling. We leave comments mentioning the issue in case it re-appears. The `DisplayMode` is swapped, so now `'2D text'` means that the text always faces the camera, and `'3D text'` means that the text can be positioned in different orientations in the 3D space. This is consistent with the `Draft Label` behavior. A function `draftutils.gui_utils.migrate_text_display_mode` is provided to help migrate older objects of type `Text` or `DraftText` to the new display mode. |
|||
mod - src/Mod/Draft/draftmake/make_text.py | Diff File | |||
mod - src/Mod/Draft/draftutils/gui_utils.py | Diff File | |||
mod - src/Mod/Draft/draftviewproviders/view_text.py | Diff File |