]> git.saurik.com Git - wxWidgets.git/commitdiff
SetSelection() must update m_selectionOld, otherwise it doesn't correspond to the...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Jan 2006 00:43:23 +0000 (00:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Jan 2006 00:43:23 +0000 (00:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/combobox.h
src/msw/combobox.cpp

index 7449a7b526d15fa316bf497e241df3e551c6a3c2..0ef87a536a301f63d15a2151195690f1a2375f09 100644 (file)
@@ -91,7 +91,7 @@ public:
     virtual wxTextPos GetLastPosition() const;
     virtual void Replace(long from, long to, const wxString& value);
     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 int GetSelection() const;
     virtual void GetSelection(long* from, long* to) const;
index d85ef7e8875e1ac76e16a5c1ad4d9f21bb5aada3..c8fd88ae27522c267667743c5231c05d0db96880 100644 (file)
@@ -755,6 +755,16 @@ void wxComboBox::Clear()
     m_value.clear();
 }
 
+// ----------------------------------------------------------------------------
+// overridden wxChoice methods
+// ----------------------------------------------------------------------------
+
+void wxComboBox::SetSelection(int n)
+{
+    wxChoice::SetSelection(n);
+    m_selectionOld = n;
+}
+
 // ----------------------------------------------------------------------------
 // standard event handling
 // ----------------------------------------------------------------------------