Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

histselect: get_selected() can return None seliter

At least with my version of PyGtk (2.14.1), when no rows are selected (when the
dialog first opens), seliter is None which leads to a backtrace when passed
to iter_next()

Changeset 209a98577d93

Parent 22fa91441ef3

by Steve Borho

Changes to one file · Browse files at 209a98577d93 Showing diff from parent 22fa91441ef3 Diff from another changeset...

 
109
110
111
 
 
 
 
112
113
114
 
109
110
111
112
113
114
115
116
117
118
@@ -109,6 +109,10 @@
  self.applybtn.set_sensitive(self.dirty)     model, seliter = self.tv.get_selection().get_selected() + if not seliter: + self.down_button.set_sensitive(False) + self.up_button.set_sensitive(False) + return     next = model.iter_next(seliter)   self.down_button.set_sensitive(next != None)