[gnome-music/wip/pl-artists-fixes: 1/4] view: Don't reload playlist when clicked multiple times



commit e9500e06384dd1bb533e36a4c0730668ebc59bb9
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 2833bfb..400301b 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -1006,6 +1006,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]