diff --git a/src/compas_igs2/rhino/forms/attributesform.py b/src/compas_igs2/rhino/forms/attributesform.py index ea5a193..9a34597 100644 --- a/src/compas_igs2/rhino/forms/attributesform.py +++ b/src/compas_igs2/rhino/forms/attributesform.py @@ -106,7 +106,7 @@ def create_force_table(cls, sceneNode, dual=[]): attributes = filter(lambda attr: attr in Allowed, attributes) for attr in attributes: - checkbox = type(datastructure.default_edge_attributes[attr]) == bool + checkbox = type(datastructure.default_edge_attributes[attr]) is bool attr = attr.replace("_", "-") table.add_column(attr, Editable=False, checkbox=checkbox) @@ -146,7 +146,7 @@ def create_constraint_edge_table(cls, sceneNode, dual=[]): attributes = filter(lambda attr: attr in Allowed, attributes) for attr in attributes: - checkbox = type(datastructure.default_edge_attributes[attr]) == bool + checkbox = type(datastructure.default_edge_attributes[attr]) is bool attr = attr.replace("_", "-") table.add_column(attr, Editable=False, checkbox=checkbox) @@ -184,7 +184,7 @@ def create_constraint_formvertex_table(cls, sceneNode, dual=[]): for attr in attributes: editable = attr[0] != "_" - checkbox = type(datastructure.default_vertex_attributes[attr]) == bool + checkbox = type(datastructure.default_vertex_attributes[attr]) is bool if not editable: attr = attr[1:] table.add_column(attr, Editable=False, checkbox=checkbox) @@ -215,7 +215,7 @@ def create_constraint_forcevertex_table(cls, sceneNode, dual=[]): for attr in attributes: editable = attr[0] != "_" - checkbox = type(datastructure.default_vertex_attributes[attr]) == bool + checkbox = type(datastructure.default_vertex_attributes[attr]) is bool if not editable: attr = attr[1:] table.add_column(attr, Editable=False, checkbox=checkbox) @@ -240,7 +240,7 @@ def create_vertices_table(cls, sceneNode): attributes = table.sort_attributes(attributes) for attr in attributes: editable = attr[0] != "_" - checkbox = type(datastructure.default_vertex_attributes[attr]) == bool + checkbox = type(datastructure.default_vertex_attributes[attr]) is bool if not editable: attr = attr[1:] table.add_column(attr, Editable=editable, checkbox=checkbox) @@ -266,7 +266,7 @@ def create_edges_table(cls, sceneNode): for attr in attributes: editable = attr[0] != "_" - checkbox = type(datastructure.default_edge_attributes[attr]) == bool + checkbox = type(datastructure.default_edge_attributes[attr]) is bool if not editable: attr = attr[1:] table.add_column(attr, Editable=editable, checkbox=checkbox) @@ -365,10 +365,10 @@ def on_edited(sender, event): original_value = get_set_attributes(key, attr) - if type(original_value) == float and type(new_value) == int: + if type(original_value) is float and type(new_value) is int: new_value = float(new_value) if new_value != original_value: - if type(new_value) == type(original_value): + if type(new_value) is type(original_value): print("will update key: %s, attr: %s, value: %s" % (key, attr, new_value)) self.to_update[(key, attr)] = (get_set_attributes, new_value) else: