]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for wrong combobox/height being reported if set size is pending
authorJulian Smart <julian@anthemion.co.uk>
Wed, 14 Jun 2006 13:11:53 +0000 (13:11 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 14 Jun 2006 13:11:53 +0000 (13:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/window.h
src/msw/choice.cpp

index 16e1139b6d6dffbf1c7ee822e32748fb93dcb37d..964a71b5606e2ce9887d53fe6bcbfbe0b0f8bf05 100644 (file)
@@ -517,12 +517,14 @@ private:
     // current defer window position operation handle (may be NULL)
     WXHANDLE m_hDWP;
 
+protected:
     // When deferred positioning is done these hold the pending changes, and
     // are used for the default values if another size/pos changes is done on
     // this window before the group of deferred changes is completed.
     wxPoint     m_pendingPosition;
     wxSize      m_pendingSize;
 
+private:
 #ifdef __POCKETPC__
     bool        m_contextMenuEnabled;
 #endif
index 80cc353d68e1a53b49b23bf77ce1baefdaee01a8..f5e0ce73f50522ad7f3a065088a01632aafc4e20 100644 (file)
@@ -542,6 +542,11 @@ void wxChoice::DoSetSize(int x, int y,
 
     wxControl::DoSetSize(x, y, width, height, sizeFlags);
 
+    // If we're storing a pending size, make sure we store
+    // the original size for reporting back to the app.
+    if (m_pendingSize != wxDefaultSize)
+        m_pendingSize = wxSize(width, heightOrig);
+
     // This solution works on XP, but causes choice/combobox lists to be
     // too short on W2K and earlier.
 #if 0