addFirst on array is slow parse to OrderedCollection in setBrowserItemList:
authorMichael Beyl <mb@exept.de>
Thu, 13 Mar 2003 16:15:10 +0100
changeset 4662 1351fd934a4a
parent 4661 83f70cf82282
child 4663 d11b898b6fc5
addFirst on array is slow parse to OrderedCollection in setBrowserItemList:
DirectoryContentsBrowser.st
--- a/DirectoryContentsBrowser.st	Thu Mar 13 16:07:55 2003 +0100
+++ b/DirectoryContentsBrowser.st	Thu Mar 13 16:15:10 2003 +0100
@@ -1031,8 +1031,8 @@
     showDir := self viewDirsInContentsBrowser value.
     (showDir and:[self directory notNil and:[self directory isRootDirectory not]]) ifTrue:[
         directoryUpItem := DirectoryContentsBrowser itemClass fileName:(self directory construct:'..').
-        locItems := filteredItems copy.
-        locItems addFirst:directoryUpItem.
+        locItems := OrderedCollection with:directoryUpItem.
+        locItems addAll:filteredItems.
     ] ifFalse:[
         locItems := filteredItems.
     ].
@@ -2869,5 +2869,5 @@
 !DirectoryContentsBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.88 2003-03-03 15:13:07 penk Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.89 2003-03-13 15:15:10 mb Exp $'
 ! !