]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
revert togglable tools to previous state if the change was vetoed by OnLeftClick()
[wxWidgets.git] / src / generic / dirctrlg.cpp
index 54a3a5c5dd0663ebe3b6ba400d287d061e134bde..3a7e8ef87ae0f2c7a92b34a447723d46be527e85 100644 (file)
@@ -57,6 +57,7 @@
 
 #ifdef __WXMSW__
 #include <windows.h>
+#include "wx/msw/winundef.h"
 
 // FIXME - Mingw32 1.0 has both _getdrive() and _chdrive(). For now, let's assume
 //         older releases don't, but it should be verified and the checks modified
@@ -504,7 +505,7 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
     Init();
 
     long treeStyle = wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT;
-    
+
 #ifdef __WXGTK20__
     treeStyle |= wxTR_NO_LINES;
 #endif
@@ -553,7 +554,7 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
     m_rootId = m_treeCtrl->AddRoot( rootName, 3, -1, rootData);
     m_treeCtrl->SetItemHasChildren(m_rootId);
     ExpandDir(m_rootId); // automatically expand first level
-    
+
     // Expand and select the default path
     if (!m_defaultPath.empty())
     {
@@ -819,7 +820,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
             while(strTok.HasMoreTokens())
             {
                 curFilter = strTok.GetNextToken();
-                if (d.GetFirst(& eachFilename, m_currentFilterStr, style))
+                if (d.GetFirst(& eachFilename, curFilter, style))
                 {
                     do
                     {