Skip to content

Commit

Permalink
Fix wrongly recreating wxComboBox in disabled state in wxMSW
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
YuSanka authored and vadz committed Jan 12, 2023
1 parent 4517725 commit 8e60492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/msw/combobox.cpp
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8e60492

Please sign in to comment.