@@ -1030,10 +1030,10 @@ def on_treeview_selection_changed(self, selection, pane):
10301030 is_single_foldable_row = False
10311031 if (selection .count_selected_rows () == 1 ):
10321032 path = selection .get_selected_rows ()[1 ][0 ]
1033- iter = self .model .get_iter (path )
1034- os_path = self .model .value_path (iter , pane )
1033+ it = self .model .get_iter (path )
1034+ os_path = self .model .value_path (it , pane )
10351035 is_single_foldable_row = self .model .is_folder (
1036- iter , pane , os_path )
1036+ it , pane , os_path )
10371037
10381038 get_action ("DirCompare" ).set_sensitive (True )
10391039 get_action ("DirCollapseRecursively" ).set_sensitive (
@@ -1198,6 +1198,9 @@ def on_button_diff_clicked(self, button):
11981198
11991199 def on_collapse_recursive_clicked (self , action ):
12001200 pane = self ._get_focused_pane ()
1201+ if pane is None :
1202+ return
1203+
12011204 root_path = self ._get_selected_paths (pane )[0 ]
12021205 filter_model = Gtk .TreeModelFilter (
12031206 child_model = self .model , virtual_root = root_path )
@@ -1215,6 +1218,9 @@ def append_paths_to_collapse(
12151218
12161219 def on_expand_recursive_clicked (self , action ):
12171220 pane = self ._get_focused_pane ()
1221+ if pane is None :
1222+ return
1223+
12181224 paths = self ._get_selected_paths (pane )
12191225 for path in paths :
12201226 self .treeview [pane ].expand_row (path , True )
0 commit comments