diff options
author | Josh Morman <mormjb@gmail.com> | 2020-06-22 08:05:26 -0400 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-08-14 06:07:28 -0700 |
commit | 17071332b1603878d05f139131d163d08efbae5a (patch) | |
tree | 1e02194c9ff588bd073a73db2c76dfd37caa2686 /grc/gui | |
parent | c2f9eb04268dcc70dcecc30e1aadccb42881a2a0 (diff) |
grc: do not run stale flowgraph
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/Application.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/grc/gui/Application.py b/grc/gui/Application.py index 3b1596e0dd..d7c2bd4ada 100644 --- a/grc/gui/Application.py +++ b/grc/gui/Application.py @@ -701,6 +701,7 @@ class Application(Gtk.Application): # Gen/Exec/Stop ################################################## elif action == Actions.FLOW_GRAPH_GEN: + self.generator = None if not page.process: if not page.saved or not page.file_path: Actions.FLOW_GRAPH_SAVE() # only save if file path missing or not saved @@ -709,23 +710,25 @@ class Application(Gtk.Application): try: Messages.send_start_gen(generator.file_path) generator.write() + self.generator = generator except Exception as e: Messages.send_fail_gen(e) - else: - self.generator = None + + elif action == Actions.FLOW_GRAPH_EXEC: if not page.process: Actions.FLOW_GRAPH_GEN() - xterm = self.platform.config.xterm_executable - if self.config.xterm_missing() != xterm: - if not os.path.exists(xterm): - Dialogs.show_missing_xterm(main, xterm) - self.config.xterm_missing(xterm) - if page.saved and page.file_path: - Executor.ExecFlowGraphThread( - flow_graph_page=page, - xterm_executable=xterm, - callback=self.update_exec_stop + if self.generator: + xterm = self.platform.config.xterm_executable + if self.config.xterm_missing() != xterm: + if not os.path.exists(xterm): + Dialogs.show_missing_xterm(main, xterm) + self.config.xterm_missing(xterm) + if page.saved and page.file_path: + Executor.ExecFlowGraphThread( + flow_graph_page=page, + xterm_executable=xterm, + callback=self.update_exec_stop ) elif action == Actions.FLOW_GRAPH_KILL: if page.process: |