[meld/ui-next] dirdiff: Fix focus handling in cursor change event
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/ui-next] dirdiff: Fix focus handling in cursor change event
- Date: Sat, 2 Mar 2019 21:21:54 +0000 (UTC)
commit 931127888252d4c5e85cbe87926390587aa10622
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Feb 17 09:14:24 2019 +1000
dirdiff: Fix focus handling in cursor change event
The existing handling does the wrong thing when e.g., the toolbar is
focused.
This is part of a broader issue with using the _get_focused_pane()
helper, but that's a larger problem to solve.
meld/dirdiff.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index b2d5ddaa..82f3b1a8 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1156,9 +1156,9 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
act.set_sensitive(False)
@Template.Callback()
- def on_treeview_cursor_changed(self, *args):
- pane = self._get_focused_pane()
- if pane is None or len(self.model) == 0:
+ def on_treeview_cursor_changed(self, view):
+ pane = self.treeview.index(view)
+ if len(self.model) == 0:
return
cursor_path, cursor_col = self.treeview[pane].get_cursor()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]