Keep disabled status when wxBitmapComboBox is recreated in wxMSW

If a disabled wxBitmapComboBox had to be recreated, it lost its disabled
status and became unexpectedly enabled.

Fix this by explicitly disabling it back in RecreateControl() if necessary.

Closes https://github.com/wxWidgets/wxWidgets/pull/376
This commit is contained in:
Steve Browne
2016-12-19 10:56:55 -05:00
committed by Vadim Zeitlin
parent 2a371515df
commit 59d26b0bad

View File

@@ -212,6 +212,10 @@ void wxBitmapComboBox::RecreateControl()
// Revert the old string value
if ( !HasFlag(wxCB_READONLY) )
ChangeValue(value);
// If disabled we'll have to disable it again after re-creating
if ( !IsEnabled() )
DoEnable(false);
}
wxBitmapComboBox::~wxBitmapComboBox()