Following patch fixes cursor jumping (caused by reinserting the text) when using non-default font in wxTextCtrl.
The problem was that WriteText calls gtk_text_insert, but it does not clear m_updateFont flag. Later when user presses some key, font setting is unnecessarily refreshed again, causing unexpected cursor jumping. Index: src/gtk/textctrl.cpp =================================================================== RCS file: /pack/cvsroots/wxwindows/wxWindows/src/gtk/textctrl.cpp,v retrieving revision 1.164 diff -u -2 -r1.164 textctrl.cpp --- src/gtk/textctrl.cpp 2003/09/23 00:09:11 1.164 +++ src/gtk/textctrl.cpp 2003/10/21 16:59:16 @@ -605,4 +605,8 @@ wxGtkTextInsert(m_text, m_defaultStyle, text.c_str(), text.Len()); + // gtk_text_insert was called with correct font + if( text.Len() > 0 ) + m_updateFont = false; + // Bring editable's cursor back uptodate. SET_EDITABLE_POS(m_text, gtk_text_get_point( GTK_TEXT(m_text) )); ------------------------------------------------------- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 _______________________________________________ Mahogany-Developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mahogany-developers