diff --git a/twander.py b/twander.py index 2402e97..5d37be5 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.156 2005/01/08 07:53:35 tundra Exp $" +RCSID = "$Id: twander.py,v 3.157 2005/01/08 08:36:12 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -4178,15 +4178,25 @@ UI.DirList.delete(0,END) # Save the new directory information - UI.DirList.insert(0, *BuildDirList(UI.CurrentDir)) - # Restore selection(s) - UI.SetSelection(sellist, active) + try: + UI.DirList.insert(0, *BuildDirList(UI.CurrentDir)) - # Restore scroll positions + # Restore selection(s) + UI.SetSelection(sellist, active) - UI.DirList.xview(MOVETO, xs[0]) - UI.DirList.yview(MOVETO, ys[0]) + # Restore scroll positions + + UI.DirList.xview(MOVETO, xs[0]) + UI.DirList.yview(MOVETO, ys[0]) + + + except: + UI.CurrentDir=STARTDIR + UI.DirList.insert(0, *BuildDirList(UI.CurrentDir)) + KeySelTop(None) + KeySelNone(None) + # Update titlebar to reflect any changes UI.UpdateTitle(UIroot)