ocarina: Better way to scroll to current song
I should use get_attrs() and then use the first result in the list, rather than using the cur_id variable. cur_id is not set in the case of loading a file.
This commit is contained in:
parent
114ac13c7a
commit
466b0a2c5b
|
@ -95,8 +95,8 @@ class ListView(gtk.TreeView):
|
|||
self.thaw()
|
||||
|
||||
def goto(self, *args):
|
||||
id = libsaria.sources.cur_id
|
||||
if id == None or id == -1: # Bad id
|
||||
id = libsaria.sources.get_attrs("id")[0]
|
||||
if id == -1: # Bad id
|
||||
return
|
||||
vis = self.get_visible_rect()
|
||||
if vis[3] == 0: # The widget hasn't been realized yet
|
||||
|
|
Loading…
Reference in New Issue