X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32d4c30a13f65b7c8cb66f813a0b8c606ad8480b..b5b0a35d6b648aead1aa353dfe9c03775496981f:/src/generic/dirctrlg.cpp diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 159b5eadfc..2af122dc8f 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -18,29 +18,30 @@ #if wxUSE_DIRDLG || wxUSE_FILEDLG +#include "wx/generic/dirctrlg.h" + #ifndef WX_PRECOMP #include "wx/hash.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/button.h" + #include "wx/icon.h" + #include "wx/settings.h" + #include "wx/msgdlg.h" + #include "wx/cmndata.h" #endif -#include "wx/generic/dirctrlg.h" #include "wx/module.h" -#include "wx/utils.h" -#include "wx/button.h" #include "wx/layout.h" -#include "wx/msgdlg.h" #include "wx/textctrl.h" #include "wx/textdlg.h" #include "wx/filefn.h" -#include "wx/cmndata.h" #include "wx/gdicmn.h" -#include "wx/intl.h" #include "wx/imaglist.h" -#include "wx/icon.h" -#include "wx/log.h" #include "wx/sizer.h" #include "wx/tokenzr.h" #include "wx/dir.h" -#include "wx/settings.h" #include "wx/artprov.h" #include "wx/mimetype.h" #include "wx/image.h" @@ -699,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() == _("..")) ||