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.
Arch BuildingParts now gained a new set of View properties that allows
to define a "capture box". Subsequent Draft and Arch objects, or anything
else that uses Draft.autogroup(), will be automatically added to that
BuildingPart if they are inside the capture box.
Removed from the Utilities menu because they already occur in the Modification menu:
Draft_FlipDimension
Draft_Edit
Draft_Slope
Removed from the Utilities menu because calling the command from there instead of from the Draft Tray does not make sense:
Draft_AutoGroup
Removed from the "Draft utility tools" toolbar because the command is very rarely used:
Draft_Heal
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.
ref. Forum discussion: Draft_OrthoArray: Crash when using active Std_Part. https://forum.freecadweb.org/viewtopic.php?f=23&t=59155&p=508132#p508132
Autogroup try to add new created Draft Objects into the active Part, but if the Part is used as a Base for the new object this could create a cyclic reference.
This behaviour is prevented by adding a check for " obj in active_part.InListRecursive"
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.
From time to time when switching to other workbenches snap_widget changes
orientation to vertical. Make sure it stays horizontal.
Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
This commit does the following things:
* Remove python2 support
* Using a bytearray instead of chr list to build up the binary data.
this also removes the need of using char encoding.
Normally the bounding box is taken from `Shape.BoundBox`.
Certain objects don't have a `Shape`, like `App::FeaturePythons`,
so the bounding box is calculated from `ViewObject.RootNode`.