We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4db771b commit 7ee24ffCopy full SHA for 7ee24ff
1 file changed
lib/python/gladevcp/hal_mdihistory.py
@@ -136,12 +136,16 @@ def reload(self):
136
fp.close()
137
138
lines = filter(bool, lines)
139
+ last = Gtk.TreeIter()
140
for l in lines:
- self.model.append((l,))
141
- #path = (len(list(lines))-1,)
142
- path = 0 #TODO: breaks the functionality
143
- self.tv.scroll_to_cell(path)
144
- self.tv.set_cursor(path)
+ last = self.model.append((l,))
+ path = self.model.get_path(last)
+ # if the hal mdi history file is empty, the model is empty and we will get an None iter
+ try:
145
+ self.tv.scroll_to_cell(path)
146
+ self.tv.set_cursor(path)
147
+ except:
148
+ pass
149
self.entry.set_text('')
150
151
def submit(self, *a):
0 commit comments