Removed too much in make_label.py

This commit is contained in:
Roy-043
2024-02-04 09:50:45 +01:00
parent 178070af5d
commit 7ca885eb25

View File

@@ -217,15 +217,16 @@ def make_label(target_point=App.Vector(0, 0, 0),
placement = App.Placement(placement, App.Rotation())
elif isinstance(placement, App.Rotation):
placement = App.Placement(App.Vector(), placement)
if target_object:
if isinstance(target_object, (list, tuple)):
_err(translate("draft","Wrong input: target_object must not be a list."))
return None
if isinstance(target_object, (list, tuple)):
_err(translate("draft","Wrong input: target_object must not be a list."))
return None
found, target_object = utils.find_object(target_object, doc)
if not found:
_err(translate("draft","Wrong input: target_object not in document."))
return None
found, target_object = utils.find_object(target_object, doc)
if not found:
_err(translate("draft","Wrong input: target_object not in document."))
return None
if target_object and subelements:
try: