Commit Graph

26 Commits

Author SHA1 Message Date
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
f0e70e68e0 [ Draft ]: Update SPDX License Identifiers (#24965) 2025-11-03 11:58:14 -06:00
marcuspollio
50e4864efb Add Draft workbench to .pre-commit-config (#24664)
* Add Draft workbench to .pre-commit-config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-15 11:21:09 +02:00
Roy-043
4677bfef79 BIM+Draft: change object related version info to log messages
To inform the user warnings are shown if an object has new or modified properties in the current version. These warnings can however be confusing, especially if there are many. With this PR they are turned into log messages. They are also moved out of translation, and instead of the object Label the object Name is displayed.

Additionally:
Zero path length warnings for path arrays are now only displayed if the Align property is True.

See: #21180.
2025-09-08 10:58:28 +02:00
Vincenzo Calligaro
b3e11ecd11 [Feature Request] [Draft] [UI/UX] Allow to turn dimension arrows on/off individually (#11941)
* Update additional files

* The LineColor and LineWidth properties are removed from Text objects.
* Arrow properties are added by the ViewProviderDraftAnnotation class only. This avoids code duplication.

* gui_annotationstyleeditor.py fix except

* view_draft_annotation.py fix except

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-08-14 10:44:49 +02:00
Roy-043
d218d35527 Restore ViewObject implementation for all Draft objects
In my tests the code works fine. Using @AIRCAP's instructions,  I have created a 'broken' file from draft_test_objects.FCStd.
2024-10-24 15:24:13 +02:00
Roy-043
6c9ea36225 Restore the ViewObject
I think we need to restore the ViewObject in such cases. I assume this problems exists for all Draft and BIM objects. So this commit is just an example implementation.
2024-10-24 15:11:22 +02:00
Yorik van Havre
68be845a68 Draft: better check for Gui object - fixes #17342 2024-10-24 15:11:22 +02:00
wmayer
83d4080fe8 App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class.
Thus rename them to 'loads' and 'dumps'
2023-09-24 10:56:35 -05:00
Roy-043
fb65b58007 Draft: Improvements related to #8081 (#8211)
DisplayMode of Text was not updated. Some houskeeping
2023-01-20 20:33:35 +01:00
Roy-043
34f43a245c Draft: Fix inconsistent properties of Draft annotations 2022-12-23 16:49:56 +01:00
Yorik van Havre
43feb585ad Draft: Fixed broken translations everywhere 2021-02-12 14:44:58 +01:00
vocx-fc
f799717f4d Arch: consider DraftText objects in the section plane for compatibility
After the reorganization of the Draft Workbench,
the `'DraftText'` objects are now of Proxy.Type `'Text'`.
In the `DraftAnnotation` class the `__setstate__` method
was defined to automatically migrate the Type.

The `Arch SectionPlane` only handles `'Text'` objects. If for
some reason there is still an old `'DraftText'` object
which has not been migrated to the new Type, it won't be found.
This is corrected by adding `'DraftText'` to the list of objects
to process.
2020-10-12 11:43:37 +02:00
vocx-fc
42599838f4 Draft: add modules of draftobjects to the proper Doxygen group
This includes `array`, `base`, `bezcurve`, `block`, `bspline`,
`circle`, `clone`, `dimension`, `draft_annotation`, `draftlink`,
`drawingview`, `ellipse`, `facebinder`, `fillet`, `label`,
`patharray`, `point`, `pointarray`, `polygon`, `rectangle`,
`shape2dview`, `shapestring`, `text`, `wire`, `wwproxy`.

These are added to the `draftobjects` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
de6f251f75 Draft: migrate DraftText type to Text 2020-07-10 12:23:43 +02:00
vocx-fc
3f75dc7c61 Draft: clean up the ViewProviderDraftAnnotation class
This class is the base of the viewproviders of annotation-type
objects like dimensions (linear, radial, angular), labels,
and texts.

The basic properties of `ViewProviderDraftAnnotation`
are set up by a method `set_properties`, which can be called
in the derived classes.

In the general proxy object `DraftAnnotation` we implement
the `onDocumentRestored` method in order to add the missing
view property `AnnotationStyle` to older objects.
2020-06-19 12:15:25 +02:00
vocx-fc
9d0e4259c3 Draft: clean up the internal DraftAnnotation class
Add a function to clarify the added properties,
and clean up the PEP8 style of the code.
2020-06-17 12:53:29 +02:00
carlopav
904f3408bc Draft: fixed wrong QT_TRANSLATE_NOOP usage in Draft Objects
.
2020-06-09 11:55:46 +02:00
vocx-fc
8d0350ef0c Draft: small updates to the Annotation class
This annotation class implements `onDocumentRestored`
in order to add the `ScaleMultiplier` property to older
`Dimension`, `Label`, and `Text` objects.
2020-05-12 10:02:21 +02:00
carlopav
cbeca1b4a6 Draft: fix ScaleMultiplier on annotation objects
Object auto create the property when opening an old Draft annotation
.
2020-05-04 10:53:54 +02:00
Yorik van Havre
5b3fea59e0 Draft: Annotation editor 2020-04-22 13:38:17 +02:00
carlopav
131961c2a8 [Draft] Cleanup splitted annotatation objects
- corrected super() methods to be Py2 compatible
- further cleanup of the code.
further cleanup


changed again to avoid super method


updated super() functions


updated to correct the parent classess targeted by super()
2020-04-16 11:37:10 +02:00
carlopav
8e3dfe7c26 [Draft] Dimension styles improvements
Dimension style property is auto-set on dimension creation.
Further improvementes in DimensionStyleContainer.
.
2020-04-16 11:37:10 +02:00
carlopav
164bbabbd8 [Draft] Cleanup of Annotation style branch
Further cleanup and guarded imports of Gui in modules.

.
2020-04-16 11:37:10 +02:00
carlopav
4855564bb8 [Draft] Group object for dimension styles 2020-04-16 11:37:10 +02:00
carlopav
6d8fe07312 [Draft] Annotation refactor and Cleanup
.


.
2020-04-16 11:37:10 +02:00
carlopav
530e8b6c58 [Draft] Split Dimension object and reorganize of annotation objects
part 1
2020-04-16 11:37:10 +02:00