X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb47b99f25c2c3b6abd5ac71cbcdcf9df2f4f487..199fbd7093daca4902bb42c9791574ad91d12565:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 95ba64e948..23b5a380f2 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1086,7 +1086,7 @@ void wxTextCtrl::Remove( long from, long to ) wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") ); #ifdef __WXGTK20__ - if ( m_windowStyle & wxTE_MULTILINE ) + if (m_windowStyle & wxTE_MULTILINE) { GtkTextBuffer * text_buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(m_text) ); @@ -1227,7 +1227,14 @@ bool wxTextCtrl::IsEditable() const wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") ); #ifdef __WXGTK20__ - return gtk_editable_get_editable(GTK_EDITABLE(m_text)); + if (m_windowStyle & wxTE_MULTILINE) + { + return gtk_text_view_get_editable(GTK_TEXT_VIEW(m_text)); + } + else + { + return gtk_editable_get_editable(GTK_EDITABLE(m_text)); + } #else return GTK_EDITABLE(m_text)->editable; #endif @@ -1584,7 +1591,8 @@ void wxTextCtrl::OnInternalIdle() } } - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate(this)) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } wxSize wxTextCtrl::DoGetBestSize() const