do nothing when old and new service is equal
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 22 Jul 2007 17:42:50 +0000 (17:42 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 22 Jul 2007 17:42:50 +0000 (17:42 +0000)
lib/python/Components/Sources/ServiceEvent.py

index 8a1c7ff..95c9140 100644 (file)
@@ -23,8 +23,9 @@ class ServiceEvent(VariableText, GUIComponent, Source, object):
        event = property(getCurrentEvent)
 
        def newService(self, ref):
        event = property(getCurrentEvent)
 
        def newService(self, ref):
-               self.cur_ref = ref
-               if not ref or (ref.flags & Ref.flagDirectory) == Ref.flagDirectory or ref.flags & Ref.isMarker:
-                       self.changed((self.CHANGED_CLEAR,))
-               else:
-                       self.changed((self.CHANGED_ALL,))
+               if not self.cur_ref or self.cur_ref != ref:
+                       self.cur_ref = ref
+                       if not ref or (ref.flags & Ref.flagDirectory) == Ref.flagDirectory or ref.flags & Ref.isMarker:
+                               self.changed((self.CHANGED_CLEAR,))
+                       else:
+                               self.changed((self.CHANGED_ALL,))