This commit is contained in:
Andrej
2025-06-04 11:03:21 +05:00
parent 6ea53d54ba
commit 5a211c67eb
3 changed files with 7 additions and 10 deletions
+5 -9
View File
@@ -411,15 +411,11 @@ def draw_filter(
if data.data["saved_searches"]:
row.operator("bim.load_search", text="", icon="IMPORT").module = module
row.operator("bim.save_search", text="", icon="EXPORT").module = module
if module != 'search':
if module == 'drawing_include':
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = (
"INCLUDE"
)
if module == 'drawing_exclude':
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = (
"EXCLUDE"
)
if module != "search":
if module == "drawing_include":
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = "INCLUDE"
if module == "drawing_exclude":
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = "EXCLUDE"
row.operator("bim.enable_editing_element_filter", icon="CANCEL", text="").filter_mode = "NONE"
row = layout.row(align=True)
row.operator("bim.add_filter_group", text="Add Search Group", icon="ADD").module = module
@@ -3476,7 +3476,7 @@ class EnableEditingElementFilter(bpy.types.Operator, tool.Ifc.Operator):
@classmethod
def description(cls, context, properties):
if properties.filter_mode == 'NONE':
if properties.filter_mode == "NONE":
return "Cancel filter"
return "Enable editing options for the include or exclude filter"
@@ -33,6 +33,7 @@ from typing import Union
from typing import overload
from typing import Literal
from typing import TypedDict
# py39 compat: re-enable when support is dropped
# from typing_extensions import assert_never