fix yet another assert when the initial combo box value was empty (replaces patch 895470)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -399,9 +399,10 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
validator, name) )
|
validator, name) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// we shouldn't call SetValue() for an empty read only combobox as it would
|
// we shouldn't call SetValue() for an empty string because this would
|
||||||
// (correctly) thro an assert and is otherwise useless anyhow
|
// (correctly) result in an assert with a read only combobox and is useless
|
||||||
if ( n || !HasFlag(wxCB_READONLY) )
|
// for the other ones anyhow
|
||||||
|
if ( !value.empty() )
|
||||||
SetValue(value);
|
SetValue(value);
|
||||||
|
|
||||||
// a (not read only) combobox is, in fact, 2 controls: the combobox itself
|
// a (not read only) combobox is, in fact, 2 controls: the combobox itself
|
||||||
|
Reference in New Issue
Block a user