class: DisplaySurface
authorClaus Gittinger <cg@exept.de>
Sat, 13 Jul 2013 22:37:58 +0200
changeset 6094 fc481e7d964c
parent 6093 931a298739a0
child 6095 67f3a4a88409
class: DisplaySurface changed: #setAttribute:to: use asNilIfEmpty
DisplaySurface.st
--- a/DisplaySurface.st	Sat Jul 13 22:25:01 2013 +0200
+++ b/DisplaySurface.st	Sat Jul 13 22:37:58 2013 +0200
@@ -836,17 +836,15 @@
 
 setAttribute:key to:newValue
     newValue isNil ifTrue:[
-	moreAttributes notNil ifTrue:[
-	    moreAttributes removeKey:key ifAbsent:[].
-	    moreAttributes isEmpty ifTrue:[
-		moreAttributes := nil
-	    ]
-	]
+        moreAttributes notNil ifTrue:[
+            moreAttributes removeKey:key ifAbsent:[].
+            moreAttributes := moreAttributes asNilIfEmpty
+        ]
     ] ifFalse:[
-	moreAttributes isNil ifTrue:[
-	    moreAttributes := IdentityDictionary new.
-	].
-	moreAttributes at:key put:newValue.
+        moreAttributes isNil ifTrue:[
+            moreAttributes := IdentityDictionary new.
+        ].
+        moreAttributes at:key put:newValue.
     ].
 !
 
@@ -2586,7 +2584,7 @@
 !DisplaySurface class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/DisplaySurface.st,v 1.157 2013-06-26 08:00:31 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DisplaySurface.st,v 1.158 2013-07-13 20:37:58 cg Exp $'
 ! !