Draft: Draft_Label fix label type list
This commit is contained in:
@@ -217,12 +217,7 @@ class Label(DraftAnnotation):
|
||||
"LabelType",
|
||||
"Label",
|
||||
_tip)
|
||||
obj.LabelType = ["Custom", "Name", "Label", "Position",
|
||||
"Length", "Area", "Volume",
|
||||
"Tag", "Material",
|
||||
"Label + Position", "Label + Length",
|
||||
"Label + Area", "Label + Volume",
|
||||
"Label + Material"]
|
||||
obj.LabelType = get_label_types()
|
||||
|
||||
def onDocumentRestored(self, obj):
|
||||
"""Execute code when the document is restored.
|
||||
@@ -298,6 +293,23 @@ class Label(DraftAnnotation):
|
||||
DraftLabel = Label
|
||||
|
||||
|
||||
def get_label_types():
|
||||
return ["Custom",
|
||||
"Name",
|
||||
"Label",
|
||||
"Position",
|
||||
"Length",
|
||||
"Area",
|
||||
"Volume",
|
||||
"Tag",
|
||||
"Material",
|
||||
"Label + Position",
|
||||
"Label + Length",
|
||||
"Label + Area",
|
||||
"Label + Volume",
|
||||
"Label + Material"]
|
||||
|
||||
|
||||
def return_info(target, typ, subelement=None):
|
||||
"""Return the text list from the target and the given type.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user