Commit Graph

10 Commits

Author SHA1 Message Date
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
f620d68c19 Removed outdated UTF8 declaration [ Other ] (#24528)
* Removed outdated UTF8 declaration

* [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-13 18:34:43 +02:00
Kevin Martin
2b9fa18b68 Eliminate many "doing what you told me to" messages
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
2024-02-02 08:58:45 -05:00
Roy-043
4cf613ec31 Draft: get_movable_children: prevent endless loop
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81547
2023-09-28 15:19:25 +02:00
Roy-043
31221291a8 Draft: improve get_group_contents function in groups.py
For consistency the get_group_contents function should use is_group to identify groups. The code dedicated to Site objects and Drawing pages was removed.
2022-01-06 17:40:11 +01:00
Roy-043
f42d85f8df Fix 3 issues with the Draft Tray layer list
Fix 3 issues with the Draft Tray layer list:
The layer list should display even if there are no layers so that the "Add new Layer" option can be selected.
"Project" and "BuildingPart" objects should be added to the list (depending on "AutogroupAddGroups" of course).
The "LayerContainer" object should not be added to the list. Although it is in fact a group, it is just too confusing.

Added is_group function. This function can also be used in gui_groups.py.
2021-06-21 21:07:41 +02:00
Matthijs Kooijman
630b0f2af4 Draft: Do not move children of App::Link objects
This caused the original object to be moved when using the Draft move
tool to move a link object, when the original object has MoveWithHost
set (e.g. a Window). There was already a similar exception for clones,
so it makes sense to extend this for links too.

Note that there seem to be more problems with the "MoveWithHost"
mechanism and fixing them might completely refactor this code, but until
then, this is a simple and targeted fix that at least makes moving
links to windows work as expected.

See https://forum.freecadweb.org/viewtopic.php?f=23&t=57223 for
discussion of this bug, its fix and the additional problems mentioned.
2021-05-22 16:51:04 +02:00
Matthijs Kooijman
ffbac23432 Draft: Improve docs for get_group_contents spaces parameter
The documentation suggested subtly different semantics from what the
code implements.
2021-05-09 17:33:46 +02:00
paul lee
998511e8f5 [Draft.draftutils.groups] get_windows() to support Links
FC Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=55438
2021-02-12 09:59:28 +08:00
vocx-fc
dd70caa723 Draft: add modules of draftutils to the proper Doxygen group
This includes `gui_utils`, `init_draft_statusbar`, `init_tools`,
`messages`, `todo`, `translate`, `utils`.

These are added to the `draftutils` Doxygen group
so that the functions contained in each module are listed
appropriately in the automatically generated documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
314637e945 Draft: move grouping functions to draftutils.groups module
These functions were previously in `draftutils.utils`,
and are related to grouping objects and finding objects
inside groups. These include `get_group_names`, `ungroup`,
`get_windows`, `get_group_contents`, `get_movable_children`.
These are imported in the main `Draft.py` module, so compatibility
is retained.

Modules which use these functions are updated; these include
Gui Commands like `Move`, `Rotate`, `Scale`, `AddToGroup`,
as well as objects like `DrawingView` and `Shape2DView`,
and `ViewProviderClone`.
The code inside the `importDXF` module is also updated.

The Arch Workbench uses many of these functions
but it does so from the `Draft` namespace, so these edits
don't change the situation for these commands.
2020-07-13 14:35:38 +02:00