diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-04-09 19:12:48 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-04-09 19:12:48 (GMT) |
commit | ce141a507c4641c78594119afd4e2eece7e448b8 (patch) | |
tree | d3239e6d408d01b38db34e243dcc914b77a616f1 /playlist.py | |
parent | 90183d95e33ee73f29caefb642c5296b1d780212 (diff) |
Update order in the playlist when delete one item - SL #4435
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'playlist.py')
-rw-r--r-- | playlist.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/playlist.py b/playlist.py index 74a5370..123effb 100644 --- a/playlist.py +++ b/playlist.py @@ -129,6 +129,12 @@ class PlayList(Gtk.ScrolledWindow): self._items.pop(index) self.treemodel.remove(self.treemodel.get_iter(row)) + # uptade the order numbers in the playlist + index = 0 + for tree_item, playlist_item in zip(self.treemodel, self._items): + tree_item[0] = index + index = index + 1 + def check_available_media(self, path): if self.is_from_journal(path): path = self.get_path_from_journal(path) |