]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
we now must skip right click events in order to allow for context events to be generated
[wxWidgets.git] / src / msw / textctrl.cpp
index 4ba1eafe20f2c5c87c5688b9f4c28f50e0dcfcd2..4d90bd0d7220a6f5d61ed6ff997d8ce12b0bfb49 100644 (file)
@@ -914,6 +914,14 @@ void wxTextCtrl::SetInsertionPoint(long pos)
 
 void wxTextCtrl::SetInsertionPointEnd()
 {
+    // we must not do anything if the caret is already there because calling
+    // SetInsertionPoint() thaws the controls if Freeze() had been called even
+    // if it doesn't actually move the caret anywhere and so the simple fact of
+    // doing it results in horrible flicker when appending big amounts of text
+    // to the control in a few chunks (see DoAddText() test in the text sample)
+    if ( GetInsertionPoint() == GetLastPosition() )
+        return;
+
     long pos;
 
 #if wxUSE_RICHEDIT