diff options
author | Chris Donohue <christopher.donohue@gmail.com> | 2020-02-04 20:40:04 -0500 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2020-02-07 11:08:44 -0500 |
commit | b82180a02cff3991c5905f5fadf6ffa9bf4879d8 (patch) | |
tree | d35d92e0d0d3e8ccbbd9c5c1f4def57c09695c36 /grc | |
parent | 475e4a156b516c089175afb998acdc80b740b437 (diff) |
grc: fix ctrl+s keyboard shortcut on new flowgraphs
Diffstat (limited to 'grc')
-rw-r--r-- | grc/gui/Application.py | 2 | ||||
-rw-r--r-- | grc/gui/MainWindow.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/grc/gui/Application.py b/grc/gui/Application.py index e07eb4c833..efdb437c7c 100644 --- a/grc/gui/Application.py +++ b/grc/gui/Application.py @@ -132,6 +132,7 @@ class Application(Gtk.Application): main.new_page(file_path, show=file_path_to_show == file_path) if not main.current_page: main.new_page() # ensure that at least a blank page exists + main.current_page.saved = False main.btwin.search_entry.hide() @@ -590,6 +591,7 @@ class Application(Gtk.Application): ################################################## elif action == Actions.FLOW_GRAPH_NEW: main.new_page() + main.current_page.saved = False args = (GLib.Variant('s', 'qt_gui'),) flow_graph = main.current_page.flow_graph flow_graph.options_block.params['generate_options'].set_value(str(args[0])[1:-1]) diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py index 36ffe1c546..c994ac23d2 100644 --- a/grc/gui/MainWindow.py +++ b/grc/gui/MainWindow.py @@ -330,7 +330,9 @@ class MainWindow(Gtk.ApplicationWindow): Actions.FLOW_GRAPH_KILL() #remove the page self.notebook.remove_page(self.notebook.page_num(self.page_to_be_closed)) - if ensure and self.notebook.get_n_pages() == 0: self.new_page() #no pages, make a new one + if ensure and self.notebook.get_n_pages() == 0: + self.new_page() #no pages, make a new one + self.current_page.saved = False self.page_to_be_closed = None #set the page to be closed back to None return True |