X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b2e0e6d199351c14ff0fe621ea8c8a3e4055a26..c753eb9269d1e6c99b80a2d782ce49d9864ac1da:/src/gtk/textentry.cpp diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 99d0f12943..20abc5559b 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -103,11 +103,12 @@ void wxTextEntry::WriteText(const wxString& value) gtk_editable_set_position(edit, len); } -wxString wxTextEntry::GetValue() const +wxString wxTextEntry::DoGetValue() const { const wxGtkString value(gtk_editable_get_chars(GetEditable(), 0, -1)); - return wxGTK_CONV_BACK_FONT(value, GetEditableWindow()->GetFont()); + return wxGTK_CONV_BACK_FONT(value, + const_cast(this)->GetEditableWindow()->GetFont()); } void wxTextEntry::Remove(long from, long to) @@ -318,7 +319,7 @@ void wxTextEntry::SendMaxLenEvent() // generating a dummy wxEVT_COMMAND_TEXT_UPDATED event //IgnoreNextTextUpdate(); - wxWindow * const win = const_cast(GetEditableWindow()); + wxWindow * const win = GetEditableWindow(); wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId()); event.SetEventObject(win); event.SetString(GetValue());