Skip to content
Snippets Groups Projects
Commit 0fc40d46 authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Fix loading of arbitrary SFGs from file

parent c6fb1fbf
No related branches found
No related tags found
No related merge requests found
Pipeline #88099 passed
......@@ -449,7 +449,7 @@ class MainWindow(QMainWindow):
self.sfg_dict[sfg.name] = sfg
def _show_precedence_graph(self):
def _show_precedence_graph(self, event=None):
self.dialog = ShowPCWindow(self)
self.dialog.add_sfg_to_dialog()
self.dialog.show()
......@@ -729,7 +729,7 @@ class MainWindow(QMainWindow):
self.plot = Plot(simulation, sfg, self)
self.plot.show()
def simulate_sfg(self):
def simulate_sfg(self, event=None):
self.dialog = SimulateSFGWindow(self)
for _, sfg in self.sfg_dict.items():
......
......@@ -119,6 +119,6 @@ def python_to_sfg(path: str) -> SFG:
exec(code, globals(), locals())
return (
locals()["prop"]["name"] if "prop" in locals() else {},
locals()["prop"]["name"] if "prop" in locals() else [v for k, v in locals().items() if isinstance(v, SFG)][0],
locals()["positions"] if "positions" in locals() else {},
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment