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.

Closes #23132.
This commit is contained in:
Oleksandra Yushchenko 2023-01-12 11:15:46 +01:00 committed by Vadim Zeitlin
parent 451772530c
commit 8e604926c3

View file

@ -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);
}