]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filectrlcmn.cpp
remove default wxDC ctor to make it impossible to construct DCs without the associate...
[wxWidgets.git] / src / common / filectrlcmn.cpp
index d6b4adb044c4d3030d79df8de0855d3c1e99cefe..d0af51319c1783dc9ffde6992af3e0d88befccf4 100644 (file)
@@ -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