X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce7fe42e848cc0c9058dae906c3a7bded50681e6..a672d82a64965edcef6260c6fefffb94f76dd096:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 10a90eaad7..bce644abf4 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -2,7 +2,6 @@ // Name: src/gtk/textctrl.cpp // Purpose: // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling, Vadim Zeitlin, 2005 Mart Raudsepp // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -1121,11 +1120,7 @@ void wxTextCtrl::WriteText( const wxString &text ) #endif // First remove the selection if there is one - // TODO: Is there an easier GTK specific way to do this? - long from, to; - GetSelection(&from, &to); - if (from != to) - Remove(from, to); + gtk_text_buffer_delete_selection(m_buffer, false, true); // Insert the text wxGtkTextInsert( m_text, m_buffer, m_defaultStyle, buffer );