cache initial root
authorClaus Gittinger <cg@exept.de>
Thu, 30 Dec 2010 19:15:50 +0100
changeset 9678 04cf959bfd96
parent 9677 c1e02ae133f2
child 9679 0b45df64411f
cache initial root
FileDialog.st
--- a/FileDialog.st	Wed Dec 29 17:27:07 2010 +0100
+++ b/FileDialog.st	Thu Dec 30 19:15:50 2010 +0100
@@ -18,7 +18,8 @@
 		filenameLabelHolder isLoadDialog newDirectoryVisibilityHolder
 		appendButtonVisibleHolder appendWasPressed
 		buttonPanelVisibleHolder appendLabelHolder browseVisibleHolder
-		selectedDeviceDrive listOfDeviceDrives rootDirectoryHolder'
+		selectedDeviceDrive listOfDeviceDrives rootDirectoryHolder
+		initialRoot'
 	classVariableNames:'LastExtent'
 	poolDictionaries:''
 	category:'Interface-Tools-File'
@@ -1704,21 +1705,26 @@
     "
     |root|
 
-    (root := self directory) notNil ifTrue:[
-        root := root asFilename.
+    initialRoot isNil ifTrue:[
 
-        root isDirectory ifFalse:[
-            root := root directory.
+        (root := self directory) notNil ifTrue:[
+            root := root asFilename.
 
             root isDirectory ifFalse:[
-                root := nil.
+                root := root directory.
+                root isDirectory ifFalse:[
+                    root := nil.
+                ]
             ]
-        ]
+        ].
+        root isNil ifTrue:[
+            root := Filename currentDirectory.
+        ].
+        initialRoot := root asAbsoluteFilename.
     ].
-    root isNil ifTrue:[
-        root := Filename currentDirectory.
-    ].
-    ^ root asAbsoluteFilename
+    ^ initialRoot
+
+    "Modified: / 27-12-2010 / 09:56:30 / cg"
 !
 
 postBuildFileNameField:aWidget
@@ -1935,9 +1941,9 @@
 !FileDialog class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileDialog.st,v 1.110 2010-08-24 14:08:48 sr Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileDialog.st,v 1.111 2010-12-30 18:15:50 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/FileDialog.st,v 1.110 2010-08-24 14:08:48 sr Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileDialog.st,v 1.111 2010-12-30 18:15:50 cg Exp $'
 ! !