X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cf3e587a2ec542ba1eb6e03a84c54edefae1881..9eb2347dc3527c32e6a041cba51431bf47c4eac4:/src/common/filectrlcmn.cpp diff --git a/src/common/filectrlcmn.cpp b/src/common/filectrlcmn.cpp index d6b4adb044..d0af51319c 100644 --- a/src/common/filectrlcmn.cpp +++ b/src/common/filectrlcmn.cpp @@ -25,9 +25,9 @@ const wxChar wxFileCtrlNameStr[] = wxT( "wxfilectrl" ); -DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED ); -DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED ); -DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FOLDERCHANGED ); +DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED ) +DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED ) +DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FOLDERCHANGED ) IMPLEMENT_DYNAMIC_CLASS( wxFileCtrlEvent, wxCommandEvent ) @@ -84,10 +84,10 @@ wxString wxFileCtrlEvent::GetFile() const wxASSERT_MSG( !wxDynamicCast( GetEventObject(), wxFileCtrl )->HasMultipleFileSelection(), wxT( "Please use GetFiles() to get all files instead of this function" ) ); - if ( files.Count() == 0 ) - return wxEmptyString; - else - return files[0]; + wxString string; + if (m_files.Count() != 0) + string = m_files[0]; + return string; } #endif // wxUSE_FILECTRL