From 0015757fecd9eca06336af8c10e900589c34cbea Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Sep 2012 22:26:58 +0000 Subject: [PATCH] Don't call ClearAll() before LoadFile() in the stc sample. 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 --- samples/stc/edit.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/samples/stc/edit.cpp b/samples/stc/edit.cpp index ed4c804..17e3737 100644 --- a/samples/stc/edit.cpp +++ b/samples/stc/edit.cpp @@ -533,18 +533,6 @@ bool Edit::LoadFile (const wxString &filename) { // 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); -- 2.7.4