Label.st
changeset 5750 12b4fa216382
parent 5749 d343e6f28915
child 5751 17064cf2e823
--- a/Label.st	Mon May 16 08:53:15 2016 +0200
+++ b/Label.st	Mon May 16 09:17:08 2016 +0200
@@ -1471,7 +1471,8 @@
     "by slow scrolling the label, ensure that the label's text is readable.
      (stops when the cursor enters)"
     
-    |animatorAndOffset offset animator atTop atBottom nextOffset nextAnimationDelay focusView|
+    |animatorAndOffset offset animator logoScrolled 
+     atTop atBottom nextOffset nextAnimationDelay focusView|
     
     animatorAndOffset := self objectAttributeAt:#animator.
     animatorAndOffset isNil ifTrue:[^ self "I have been stopped in the meanwhile"].
@@ -1484,7 +1485,13 @@
 
     animator := animatorAndOffset at:1.
     offset := animatorAndOffset at:2.
-
+    logoScrolled := animatorAndOffset at:3.
+    logo == logoScrolled ifFalse:[
+        "/ logo changed - stop it
+        self removeObjectAttribute:#animator.
+        ^ self
+    ].
+    
     atTop := (offset == 0).
     atBottom := (offset - self font ascent + self font height) > (self height + 1).
     
@@ -1522,7 +1529,7 @@
     self stopAnimation.
 
     animator := [ self doAnimate ].
-    self objectAttributeAt:#animator put:{ animator . 0 }.
+    self objectAttributeAt:#animator put:{ animator . 0 . logo}.
     Processor addTimedBlock:animator after:(self animationDelay)
 
     "