diff options
author | Clayton Smith <argilo@gmail.com> | 2020-08-19 18:49:55 -0400 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-08-20 09:33:30 -0700 |
commit | b9ab9f6cad86f9e0edcfb1a84f29895efa60e01d (patch) | |
tree | 9c9df82e7354c1a157c8165fd5fe55aee472f53d /grc/gui | |
parent | 96b3fbffe940519354690b7d6489c7371940e07e (diff) |
grc: prevent search keystrokes from modifying flowgraph, take two
After blocks are unselected, it's necessary to trigger an Action so that
keystroke action handlers will be updated in Application._handle_action.
In my previous pull request, I achieved this by replacing a
FlowGraph.update_selected() call with a
FlowGraph.update_selected_elements() call, since the latter happens to
trigger an Action. However, this does not occur in all cases, because
FlowGraph.update_selected_elements() can return early.
To fix the issue, I've reverted that change and changed the
DrawingArea's focus-out-event handler to explicitly trigger
Actions.ELEMENT_SELECT().
After this change, blocks appear to be unselect in all cases when
accessing the block search box.
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/DrawingArea.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/grc/gui/DrawingArea.py b/grc/gui/DrawingArea.py index 2508164b3f..637a3e3e6b 100644 --- a/grc/gui/DrawingArea.py +++ b/grc/gui/DrawingArea.py @@ -210,5 +210,6 @@ class DrawingArea(Gtk.DrawingArea): # don't clear selection while context menu is active if not self._flow_graph.get_context_menu()._menu.get_visible(): self._flow_graph.unselect() - self._flow_graph.update_selected_elements() + self._flow_graph.update_selected() self.queue_draw() + Actions.ELEMENT_SELECT() |