checkin from browser
authorClaus Gittinger <cg@exept.de>
Sun, 17 Dec 1995 15:48:40 +0100
changeset 263 74a282375195
parent 262 d2c946b6a5b4
child 264 b15f9244950b
checkin from browser
Label.st
--- a/Label.st	Sat Dec 16 17:38:02 1995 +0100
+++ b/Label.st	Sun Dec 17 15:48:40 1995 +0100
@@ -775,8 +775,12 @@
 backgroundColor:aColor
     "set the background color"
 
-    bgColor := aColor on:device.
-    shown ifTrue:[self redraw]
+    aColor ~~ bgColor ifTrue:[
+        bgColor := aColor on:device.
+        shown ifTrue:[self redraw]
+    ]
+
+    "Modified: 17.12.1995 / 15:09:03 / cg"
 !
 
 foregroundColor
@@ -788,8 +792,12 @@
 foregroundColor:aColor
     "set the foreground color"
 
-    fgColor := aColor on:device.
-    shown ifTrue:[self redraw]
+    aColor ~~ fgColor ifTrue:[
+        fgColor := aColor on:device.
+        shown ifTrue:[self redraw]
+    ].
+
+    "Modified: 17.12.1995 / 15:09:15 / cg"
 !
 
 foregroundColor:fg backgroundColor:bg
@@ -1366,5 +1374,5 @@
 !Label class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.40 1995-12-16 14:58:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.41 1995-12-17 14:48:40 cg Exp $'
 ! !