Commit 523bf7cb authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets][algorithmeditor] Ensure generated name is schema compliant

parent fad71d8d
...@@ -691,13 +691,13 @@ class AlgorithmEditor(AbstractAssetEditor): ...@@ -691,13 +691,13 @@ class AlgorithmEditor(AbstractAssetEditor):
self.add_result_button.clicked.connect(self.__onAddResult) self.add_result_button.clicked.connect(self.__onAddResult)
def __get_free_name(self, widget_list): def __get_free_name(self, widget_list):
name = "Change Me" name = "Change_Me"
i = 1 i = 1
restart = True restart = True
while restart: while restart:
for widget in widget_list: for widget in widget_list:
if widget.name() == name: if widget.name() == name:
name = f"Change Me {i}" name = f"Change_Me_{i}"
i += 1 i += 1
break break
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment