]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
Applied patch [ 1489741 ] Bugfix for wxScrolledWindow::SetScrollRate in wxUniversal
[wxWidgets.git] / src / generic / dirctrlg.cpp
index 9652d6eea8b8443ade637b71300ad97becdb579d..30d47e3ea4d271af86eda683e08d83739a3389a8 100644 (file)
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/utils.h"
+    #include "wx/button.h"
+    #include "wx/icon.h"
 #endif
 
 #include "wx/module.h"
-#include "wx/button.h"
 #include "wx/layout.h"
 #include "wx/msgdlg.h"
 #include "wx/textctrl.h"
@@ -37,7 +38,6 @@
 #include "wx/cmndata.h"
 #include "wx/gdicmn.h"
 #include "wx/imaglist.h"
-#include "wx/icon.h"
 #include "wx/sizer.h"
 #include "wx/tokenzr.h"
 #include "wx/dir.h"
@@ -700,6 +700,9 @@ void wxGenericDirCtrl::OnBeginEditItem(wxTreeEvent &event)
 
 void wxGenericDirCtrl::OnEndEditItem(wxTreeEvent &event)
 {
+    if (event.IsEditCancelled())
+        return;
+
     if ((event.GetLabel().empty()) ||
         (event.GetLabel() == _(".")) ||
         (event.GetLabel() == _("..")) ||