Remove workarounds for wxTextCtrl::SetValue() events in pickers code.

Simply use ChangeValue() instead of SetValue() to avoid the unwanted events
instead of using guard variables.

No real changes but the code is simpler and shorter now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-09 13:35:57 +00:00
parent 4a2c28bf68
commit 44b7211689
6 changed files with 14 additions and 52 deletions

View File

@@ -100,8 +100,7 @@ class WXDLLIMPEXP_CORE wxFontPickerCtrl : public wxPickerBase
{
public:
wxFontPickerCtrl()
: m_bIgnoreNextTextCtrlUpdate(false),
m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE)
: m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE)
{
}
@@ -116,8 +115,7 @@ public:
long style = wxFNTP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxFontPickerCtrlNameStr)
: m_bIgnoreNextTextCtrlUpdate(false),
m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE)
: m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE)
{
Create(parent, id, initial, pos, size, style, validator, name);
}
@@ -165,9 +163,6 @@ protected:
long GetPickerStyle(long style) const
{ return (style & (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)); }
// true if the next UpdateTextCtrl() call is to ignore
bool m_bIgnoreNextTextCtrlUpdate;
// the maximum pointsize allowed to the user
unsigned int m_nMaxPointSize;