From 8e604926c3a726c93b2df2c162be57b94a10cb61 Mon Sep 17 00:00:00 2001 From: Oleksandra Yushchenko Date: Thu, 12 Jan 2023 11:15:46 +0100 Subject: [PATCH] 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. --- src/msw/combobox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 751af81426..ec2183b2b1 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -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); }