[gnome-music/pl-artists-fixes: 1/3] view: Don't reload playlist when clicked multiple times
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/pl-artists-fixes: 1/3] view: Don't reload playlist when clicked multiple times
- Date: Wed, 9 Apr 2014 08:45:59 +0000 (UTC)
commit 1648427666effe4b569366dd0e1a69a0963a80ec
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Wed Apr 9 10:32:36 2014 +0800
view: Don't reload playlist when clicked multiple times
If the user selected the current playlist displayed, don't reload the
songs to prevent items to be added multiple times to the model when
double-clicking playlists.
gnomemusic/view.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index c120c88..816da76 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -997,6 +997,10 @@ class Playlist(ViewContainer):
def _on_playlist_activated(self, widget, item_id, path):
_iter = self.playlists_model.get_iter(path)
playlist = self.playlists_model.get_value(_iter, 2)
+
+ if self.current_playlist == playlist:
+ return
+
self.current_playlist = playlist
self.name_label.set_text(playlist)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]