]> git.saurik.com Git - wxWidgets.git/commitdiff
test Freeze/Thaw completely, including clearing and setting insertion point
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 4 Mar 2008 10:04:25 +0000 (10:04 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 4 Mar 2008 10:04:25 +0000 (10:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/text/text.cpp

index bf9b9dc253e61d77ddd97de0fc5ace51af8c8fe5..3908b8e4cdbffb9240b461540a80f0212d1fecfc 100644 (file)
@@ -311,20 +311,21 @@ private:
     void DoAddText(bool freeze)
     {
         wxTextCtrl * const text = m_panel->m_textrich;
-        text->Clear();
 
         if ( freeze )
             text->Freeze();
 
+        text->Clear();
+
         for ( int i = 0; i < 100; i++ )
         {
             text->AppendText(wxString::Format(wxT("Line %i\n"), i));
         }
 
+        text->SetInsertionPoint(0);
+
         if ( freeze )
             text->Thaw();
-
-        text->SetInsertionPoint(0);
     }
 
     MyPanel *m_panel;