wxChoice may report its width as negative on wxMSW during deferred sizing
|Reported by:||ikamakj||Owned by:|
DoSetSize() may be called with width and height equal to wxDefaultCoord (-1), which occurs e.g. via wxWindow::Move(). This does not work for wxChoice on MSW if there is already a pending size change. Since the height argument in wxChoice::DoSetSize() is wxDefaultCoord, the initial lines of the function replace it by the current size, while the width argument remains -1. Since m_pendingSize is not wxDefaultSize, m_pendingSize is updated to (-1, height), which is definitely wrong.
If the size is then queried before the deferred sizing has occurred, m_pendingSize still has the wrong value, and wxWindowMSW::DoGetSize() returns -1 for the width.
Change History (5)
comment:1 Changed 9 months ago by vadz
- Status changed from new to confirmed
- Version changed from 2.9.5 to dev-latest