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:
Vadim Zeitlin
2010-04-06 18:46:29 +00:00
parent 501358073b
commit e567904ae6
4 changed files with 13 additions and 33 deletions

View File

@@ -100,10 +100,6 @@ public:
virtual void Cut();
virtual void Paste();
virtual void WriteText(const wxString& text);
virtual void Clear();
virtual void Remove(long from, long to);
// Implementation
// --------------
virtual void Command(wxCommandEvent& event);
@@ -148,17 +144,16 @@ protected:
// flag is set to true when the user edits the controls contents
bool m_dirty;
virtual void EnableTextChangedEvents(bool enable)
virtual void EnableTextChangedEvents(bool WXUNUSED(enable))
{
m_triggerUpdateEvents = enable;
// nothing to do here as the events are never generated when we change
// the controls value programmatically anyhow
}
bool m_triggerUpdateEvents ;
private :
wxMenu *m_privateContextMenu;
wxMenu *m_privateContextMenu;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
#endif // _WX_TEXTCTRL_H_