mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
Fix #4265. Bug where when loading a saved filter it showed an unnecessary = comparison (which is by default).
This commit is contained in:
@@ -271,6 +271,9 @@ def draw_filter(layout, filter_groups, data, module):
|
|||||||
op.type = sprops.facet
|
op.type = sprops.facet
|
||||||
op.index = i
|
op.index = i
|
||||||
op.module = module
|
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):
|
for j, ifc_filter in enumerate(filter_group.filters):
|
||||||
if ifc_filter.type == "entity":
|
if ifc_filter.type == "entity":
|
||||||
@@ -317,10 +320,6 @@ def draw_filter(layout, filter_groups, data, module):
|
|||||||
op.index = j
|
op.index = j
|
||||||
op.module = module
|
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
|
# TODO this should move into ifcopenshell.util
|
||||||
|
|||||||
@@ -189,6 +189,8 @@ class ImportFilterQueryTransformer(lark.Transformer):
|
|||||||
|
|
||||||
def query(self, args):
|
def query(self, args):
|
||||||
keys, comparison, value = args
|
keys, comparison, value = args
|
||||||
|
if comparison == "=":
|
||||||
|
comparison = ""
|
||||||
return {"type": "query", "name": keys, "value": f"{comparison}{value}"}
|
return {"type": "query", "name": keys, "value": f"{comparison}{value}"}
|
||||||
|
|
||||||
def comparison(self, args):
|
def comparison(self, args):
|
||||||
|
|||||||
Reference in New Issue
Block a user