Fix wrongly recreating wxComboBox in disabled state in wxMSW
When recreating a wxComboBox, as sometimes needs to be done when adding a new bitmap to wxBitmapComboBox, for example, we should only disable it if the old combobox itself was disabled, not if (any of) its parent(s) were disabled, but IsEnabled() returned true even in this case. Use IsThisEnabled() instead to ensure that we only disable the new combobox if necessary. See #23132. (cherry picked from commit 8e604926c3a726c93b2df2c162be57b94a10cb61)
This commit is contained in:
parent
1d32868d36
commit
ac29c30b8a
@ -285,6 +285,7 @@ wxMSW:
|
||||
- Fix building samples with clang under MSYS (Maarten Bent, #23057).
|
||||
- Fix memory leak when allocating command line arguments (#23081).
|
||||
- Include wxrc.exe in 64-bit wxMSW MSVC dev archive too (Danny Scott, #23122).
|
||||
- Don't disable wxComboBox after recreating it (Oleksandra Yushchenko, #23132).
|
||||
|
||||
wxOSX:
|
||||
|
||||
|
@ -537,7 +537,7 @@ void wxComboBox::MSWRecreate()
|
||||
SetSelection(selection);
|
||||
|
||||
// If disabled we'll have to disable it again after re-creating
|
||||
if ( !IsEnabled() )
|
||||
if ( !IsThisEnabled() )
|
||||
DoEnable(false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user