diff options
author | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2008-07-21 09:23:05 +0000 |
---|---|---|
committer | willmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f> | 2008-07-21 09:23:05 +0000 |
commit | 300f9e1be4eeaa75a2ad33490dde35ca743d6c51 (patch) | |
tree | a52fdbda22a971984b884b8a6adf672d2c889f47 /fs/browsewin.py | |
parent | 5fb65f3f12a07c75e9e863fea0224ea8e56eff2d (diff) | |
download | pyfilesystem-300f9e1be4eeaa75a2ad33490dde35ca743d6c51.tar.gz |
Fixed problem recursion on Windows
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@3 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/browsewin.py')
-rw-r--r-- | fs/browsewin.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/browsewin.py b/fs/browsewin.py index 5faa435..8c3c2da 100644 --- a/fs/browsewin.py +++ b/fs/browsewin.py @@ -29,7 +29,7 @@ class BrowseFrame(wx.Frame): self.tree.SetItemImage(self.root_id, self.fldridx, wx.TreeItemIcon_Normal) self.tree.SetItemImage(self.root_id, self.fldropenidx, wx.TreeItemIcon_Expanded) - self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded) + self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.OnItemExpanding) self.expand(self.root_id) @@ -43,8 +43,7 @@ class BrowseFrame(wx.Frame): if not self.fs.isdir(path): return - if item_data['expanded']: - self.tree.Expand(item_id) + if item_data['expanded']: return paths = self.fs.listdir(path, absolute=True) @@ -76,9 +75,10 @@ class BrowseFrame(wx.Frame): self.tree.Expand(item_id) - def OnItemExpanded(self, e): + def OnItemExpanding(self, e): self.expand(e.GetItem()) + e.Skip() def browse(fs): |