Fix completely broken default button handling in wxMSW

The logic in wxButton::{Set,Unset}TmpDefault() didn't work at all when
the temporary button was the same as the permanent default button as the
code made the same button non-default immediately after making it
default (or vice versa). In particular, this ensured that default button
was never highlighted correctly (at least after the first focus change)
in dialogs containing a single button only.

Fix this by simply skipping modification of the old default button if it
was the same one as the new default button.
This commit is contained in:
Vadim Zeitlin
2017-07-06 14:43:27 +02:00
parent ed173ed91e
commit b158385c47
2 changed files with 12 additions and 2 deletions

View File

@@ -172,6 +172,7 @@ wxMSW:
- Fix wxScreenDC::GetSize() with multiple monitors (iwbnwif).
- Fix background colour returned by wxTextCtrl::GetStyle() (Andreas Falkenhahn).
- Revert to using equally-sized buttons in wxToolBar by default.
- Fix default button highlighting.
- Restore dispatching wxThreadEvent while resizing the window broken in 3.1.0.
- Fix wxGraphicsMatrix::TransformDistance for Direct2D renderer.
- Fix wxDC::Clear() for rotated DC.