Draft: Call autogroup in make_hatch to put hatch in active group if any (#23464)

As the title says - this patch adds autogroup to hatch, so when created
it will be put in active group.
This commit is contained in:
tetektoza
2025-08-30 22:24:33 +02:00
committed by GitHub
parent d3b00bdb18
commit e5518f9ad1

View File

@@ -26,6 +26,7 @@ import FreeCAD
from draftobjects.hatch import Hatch
if FreeCAD.GuiUp:
from draftviewproviders.view_hatch import ViewProviderDraftHatch
import draftutils.gui_utils as gui_utils
def make_hatch(baseobject, filename, pattern, scale, rotation, translate=True):
@@ -46,4 +47,6 @@ def make_hatch(baseobject, filename, pattern, scale, rotation, translate=True):
obj.Translate = translate
if FreeCAD.GuiUp:
ViewProviderDraftHatch(obj.ViewObject)
gui_utils.format_object(obj)
gui_utils.autogroup(obj)
return obj