Fix #4265. Bug where when loading a saved filter it showed an unnecessary = comparison (which is by default).

This commit is contained in:
Dion Moult
2024-03-30 23:05:37 +11:00
parent 1eddcb9ee0
commit adc5bea4e9
2 changed files with 5 additions and 4 deletions
+3 -4
View File
@@ -271,6 +271,9 @@ def draw_filter(layout, filter_groups, data, module):
op.type = sprops.facet
op.index = i
op.module = module
op = row.operator("bim.remove_filter_group", text="", icon="X")
op.index = i
op.module = module
for j, ifc_filter in enumerate(filter_group.filters):
if ifc_filter.type == "entity":
@@ -317,10 +320,6 @@ def draw_filter(layout, filter_groups, data, module):
op.index = j
op.module = module
row = box.row()
op = row.operator("bim.remove_filter_group", icon="X")
op.index = i
op.module = module
# TODO this should move into ifcopenshell.util
+2
View File
@@ -189,6 +189,8 @@ class ImportFilterQueryTransformer(lark.Transformer):
def query(self, args):
keys, comparison, value = args
if comparison == "=":
comparison = ""
return {"type": "query", "name": keys, "value": f"{comparison}{value}"}
def comparison(self, args):