Fix text text changed events sending in OS X combo box and text control.
Don't duplicate needlessly wxTextEntry functionality in wxTextCtrl. Don't clear the combobox text entry part twice in wxComboBox::DoClear(), it is supposed to only clear the item container contents as the base class Clear() already calls wxTextEntry::Clear(). Do send text updated events from wxTextEntry itself as it applies to wxComboBox just as well as to wxTextCtrl. The unit tests now pass under wxOSX/Cocoa, not breaking them again would be appreciated. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -148,6 +148,8 @@ wxTextPos wxTextEntry::GetLastPosition() const
|
||||
void wxTextEntry::Remove(long from, long to)
|
||||
{
|
||||
GetTextPeer()->Remove( from , to ) ;
|
||||
|
||||
SendTextUpdatedEventIfAllowed();
|
||||
}
|
||||
|
||||
void wxTextEntry::SetSelection(long from, long to)
|
||||
@@ -158,11 +160,15 @@ void wxTextEntry::SetSelection(long from, long to)
|
||||
void wxTextEntry::WriteText(const wxString& str)
|
||||
{
|
||||
GetTextPeer()->WriteText( str ) ;
|
||||
|
||||
SendTextUpdatedEventIfAllowed();
|
||||
}
|
||||
|
||||
void wxTextEntry::Clear()
|
||||
{
|
||||
GetTextPeer()->Clear() ;
|
||||
|
||||
SendTextUpdatedEventIfAllowed();
|
||||
}
|
||||
|
||||
bool wxTextEntry::IsEditable() const
|
||||
|
Reference in New Issue
Block a user