[meld/meld-3-20] dirdiff: Fix expand/collapse sensitivity for fake empty rows (#342)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/meld-3-20] dirdiff: Fix expand/collapse sensitivity for fake empty rows (#342)
- Date: Thu, 20 Jun 2019 23:24:08 +0000 (UTC)
commit 43d1af322e1f56557e2188edc280fb47c8f82cea
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Jun 21 09:21:42 2019 +1000
dirdiff: Fix expand/collapse sensitivity for fake empty rows (#342)
We add path-less rows to the model to represent empty folders, which the
existing selection code wasn't handling. With this change, we don't try
to figure out whether the current selection is a folder... we just look
to see whether the model has children, which is both easier and more
correct.
meld/dirdiff.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index eb436fe0..9570da37 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1072,9 +1072,7 @@ class DirDiff(MeldDoc, Component):
if (selection.count_selected_rows() == 1):
path = selection.get_selected_rows()[1][0]
it = self.model.get_iter(path)
- os_path = self.model.value_path(it, pane)
- is_single_foldable_row = self.model.is_folder(
- it, pane, os_path)
+ is_single_foldable_row = self.model.iter_has_child(it)
get_action("DirCompare").set_sensitive(True)
get_action("DirCollapseRecursively").set_sensitive(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]