mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
prop_with_search.enable_relating_type_suggestions - keep default to False
To gradually introduce it when it's needed.
This commit is contained in:
@@ -361,7 +361,7 @@ def prop_with_search(
|
|||||||
should_click_ok: bool = False,
|
should_click_ok: bool = False,
|
||||||
original_operator_path: Optional[str] = None,
|
original_operator_path: Optional[str] = None,
|
||||||
*,
|
*,
|
||||||
enable_relating_type_suggestions: bool = True,
|
enable_relating_type_suggestions: bool = False,
|
||||||
search_threshold: int = 10,
|
search_threshold: int = 10,
|
||||||
button_kwargs: Union[dict[str, Any], None] = None,
|
button_kwargs: Union[dict[str, Any], None] = None,
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
|
|||||||
@@ -121,7 +121,13 @@ class CoveringToolUI:
|
|||||||
if AuthoringData.data["ifc_classes"]:
|
if AuthoringData.data["ifc_classes"]:
|
||||||
row = cls.layout.row(align=True)
|
row = cls.layout.row(align=True)
|
||||||
row.label(text="", icon="FILE_3D")
|
row.label(text="", icon="FILE_3D")
|
||||||
prop_with_search(row, cls.props, "relating_type_id", text="")
|
prop_with_search(
|
||||||
|
row,
|
||||||
|
cls.props,
|
||||||
|
"relating_type_id",
|
||||||
|
text="",
|
||||||
|
enable_relating_type_suggestions=True,
|
||||||
|
)
|
||||||
row.operator("bim.launch_type_manager", icon=tool.Blender.TYPE_MANAGER_ICON, text="")
|
row.operator("bim.launch_type_manager", icon=tool.Blender.TYPE_MANAGER_ICON, text="")
|
||||||
else:
|
else:
|
||||||
row.label(text=f"No {AuthoringData.data['ifc_element_type']} Found", icon="ERROR")
|
row.label(text=f"No {AuthoringData.data['ifc_element_type']} Found", icon="ERROR")
|
||||||
|
|||||||
@@ -238,7 +238,13 @@ class AnnotationToolUI:
|
|||||||
|
|
||||||
row = cls.layout.row(align=True)
|
row = cls.layout.row(align=True)
|
||||||
row.label(text="", icon="FILE_3D")
|
row.label(text="", icon="FILE_3D")
|
||||||
prop_with_search(row, cls.props, "relating_type_id", text="")
|
prop_with_search(
|
||||||
|
row,
|
||||||
|
cls.props,
|
||||||
|
"relating_type_id",
|
||||||
|
text="",
|
||||||
|
enable_relating_type_suggestions=True,
|
||||||
|
)
|
||||||
row.operator("bim.launch_annotation_type_manager", icon=tool.Blender.TYPE_MANAGER_ICON, text="")
|
row.operator("bim.launch_annotation_type_manager", icon=tool.Blender.TYPE_MANAGER_ICON, text="")
|
||||||
|
|
||||||
add_layout_hotkey_operator(cls.layout, "Add", "S_A", "Create a new annotation")
|
add_layout_hotkey_operator(cls.layout, "Add", "S_A", "Create a new annotation")
|
||||||
|
|||||||
@@ -662,6 +662,7 @@ class CreateObjectUI:
|
|||||||
text="",
|
text="",
|
||||||
button_kwargs={"emboss": False},
|
button_kwargs={"emboss": False},
|
||||||
emboss=True,
|
emboss=True,
|
||||||
|
enable_relating_type_suggestions=True,
|
||||||
)
|
)
|
||||||
# Limit width because names can get really long.
|
# Limit width because names can get really long.
|
||||||
row_.ui_units_x = 10.0
|
row_.ui_units_x = 10.0
|
||||||
|
|||||||
@@ -79,7 +79,13 @@ class BIM_PT_type(Panel):
|
|||||||
|
|
||||||
row.prop(props, "relating_type_class", text="")
|
row.prop(props, "relating_type_class", text="")
|
||||||
if type_prop.get_relating_type(None, context):
|
if type_prop.get_relating_type(None, context):
|
||||||
prop_with_search(row, props, "relating_type", text="")
|
prop_with_search(
|
||||||
|
row,
|
||||||
|
props,
|
||||||
|
"relating_type",
|
||||||
|
text="",
|
||||||
|
enable_relating_type_suggestions=True,
|
||||||
|
)
|
||||||
row.operator("bim.assign_type", icon="CHECKMARK", text="")
|
row.operator("bim.assign_type", icon="CHECKMARK", text="")
|
||||||
row_object.prop(props, "relating_type_object", icon="COPYDOWN")
|
row_object.prop(props, "relating_type_object", icon="COPYDOWN")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user