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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user