LabelAndIcon.st
changeset 5202 e5be9c22174c
parent 5020 6dd1826b889c
child 5209 173846bc5b93
--- a/LabelAndIcon.st	Mon Aug 08 17:06:02 2016 +0200
+++ b/LabelAndIcon.st	Mon Aug 08 17:07:27 2016 +0200
@@ -415,25 +415,25 @@
 
 on:aDevice
     <resource: #obsolete>
-    "return a new image on a device
-    "
+
+    self obsoleteFeatureWarning:'use onDevice:'.
     ^ self onDevice:aDevice
-
 !
 
 onDevice:aDevice
-    "return a new image on a device
-    "
+    "return with both icon and image onDevice:aDevice"
+
     |form img|
 
     aDevice isNil ifTrue:[^ self].
     icon  notNil ifTrue:[form := icon  onDevice:aDevice].
     image notNil ifTrue:[img  := image onDevice:aDevice].
+    (icon == form and:[image == img]) ifTrue:[
+        "nothing changed"
+        ^ self.
+    ].
 
     ^ LabelAndIcon form:form image:img string:string
-
-
-
 ! !
 
 !LabelAndIcon methodsFor:'initialization'!