Commit Graph

12 Commits

Author SHA1 Message Date
vocx-fc
a719859054 Draft: adjust the text size for Labels with format_object
This function, `draftutils.gui_utils.format_object`,
takes the value defined in the `DrafToolBar`, and uses it
to specify the `FontSize` for `Text` objects.

Now it specifies the `TextSize` for `Label` elements as well.
2020-06-15 09:59:57 +02:00
carlopav
a98e2076db Draft: Edit reordering 1
Started a general refactor to handle all the conversion between global and object coordinate system inside the main methods and just use object coordinates inside object functions.
Draft: Edit reordering 2

Fixed Editing of Part objects according to the new refactor
Draft: fix in autogroup function for dimensions


Draft: fixed Polygon editing when inscribed or circumscribed


Draft: Edit support for Ellipse object


.


Draft: Edit docstrings


Draft: Edit reordering 3


Draft: Fixed Edit for structure object

And also refactor Edit methods that control special object display during editing.
Draft: Fixed edit for arch wall object
2020-05-25 13:37:55 +02:00
carlopav
ff3bdf86bc [Draft] Improved Autogroup to handle Draft Annotations
Draft Dimension, Label and Text are now correctly auto-added to Part container
2020-04-16 11:37:10 +02:00
vocx-fc
a101e911f9 Draft: gui_utils, add small stylistic changes
These changes are added by carlopav in pull request #3102.
We add them in this commit already so that this branch and
that branch are easier to rebase and merge.
2020-04-07 18:12:06 +02:00
vocx-fc
691a3cdf08 Draft: gui_utils, autogroup return when GuiUp is False 2020-04-07 18:12:06 +02:00
vocx-fc
3b6c06d095 Draft: gui_utils.py clean up imports
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
2020-04-07 18:12:06 +02:00
carlopav
d637895943 [Draft] Autogroup bugfix 2020-01-27 10:12:02 +01:00
carlopav
44a521f7c1 [Draft] Autogroup: better support for App::Link
https://forum.freecadweb.org/viewtopic.php?f=23&t=40400&start=30#p360248
Reference to forum topic.
small fix


small fix
2020-01-18 17:51:21 +01:00
carlopav
202eac3d6c Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-16 14:30:10 +01:00
wmayer
3af5139865 Draft: only try to import FreeCADGui, coin and QtGui if FreeCAD.GuiUp is true 2020-01-15 12:24:18 +01:00
carlopav
15046b03a0 [Draft] Autogroup changes to include App::Part
[Draft] merged with recent changes


[Draft] App part support small fix
2020-01-13 23:13:38 +01:00
vocx-fc
ce2441c0b2 Draft: new module for GUI utility functions
Many auxiliary tools used by `Draft.py` can be defined
in another module. Many functions are moved to this module
so that `Draft.py` isn't as big and hard to maintain.

The following is a list o functions that were moved:
`get3DView`, `autogroup`, `dimSymbol`, `dimDash`,
`removeHidden`, `formatObject`, `getSelection`,
`getSelectionEx`, `select`, `loadTexture`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines,
particularly the use of `snake_case`. For example,
`get3DView` is now `get_3d_view`.

Aliases are provided for the old names so that
other functions and classes that depend on these
won't break. The new names should be the official
programming interface, while the old names
should be deprecated at some point in the future.
2020-01-10 10:04:07 +01:00