There is no need to clear the control contents before loading a file into it
because LoadFile() is supposed to do this on its own (although currently it
doesn't, which will be fixed soon).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72593
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// load file in edit and clear undo
if (!filename.empty()) m_filename = filename;
-// wxFile file (m_filename);
-// if (!file.IsOpened()) return false;
- ClearAll ();
-// long lng = file.Length ();
-// if (lng > 0) {
-// wxString buf;
-// wxChar *buff = buf.GetWriteBuf (lng);
-// file.Read (buff, lng);
-// buf.UngetWriteBuf ();
-// InsertText (0, buf);
-// }
-// file.Close();
wxStyledTextCtrl::LoadFile(m_filename);