X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/135b23b266fffceb26b29d832c7d25db99038d0d..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/gtk/textentry.cpp diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 7c9b9e8dee..20abc5559b 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -107,7 +107,8 @@ 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());