SetSelection() must update m_selectionOld, otherwise it doesn't correspond to the real selection any more and selection change events are sent twice
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,7 +91,7 @@ public:
|
|||||||
virtual wxTextPos GetLastPosition() const;
|
virtual wxTextPos GetLastPosition() const;
|
||||||
virtual void Replace(long from, long to, const wxString& value);
|
virtual void Replace(long from, long to, const wxString& value);
|
||||||
virtual void Remove(long from, long to);
|
virtual void Remove(long from, long to);
|
||||||
virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
|
virtual void SetSelection(int n);
|
||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual int GetSelection() const;
|
virtual int GetSelection() const;
|
||||||
virtual void GetSelection(long* from, long* to) const;
|
virtual void GetSelection(long* from, long* to) const;
|
||||||
|
@@ -755,6 +755,16 @@ void wxComboBox::Clear()
|
|||||||
m_value.clear();
|
m_value.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// overridden wxChoice methods
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void wxComboBox::SetSelection(int n)
|
||||||
|
{
|
||||||
|
wxChoice::SetSelection(n);
|
||||||
|
m_selectionOld = n;
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// standard event handling
|
// standard event handling
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user