Don't prematurely return from Create before appending the choices, and etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2007-12-11 00:52:43 +00:00
parent 508b108103
commit 4af4b52531

View File

@ -50,14 +50,17 @@ bool wxChoice::Create(wxWindow *parent,
const wxValidator& validator,
const wxString& name )
{
return Create(
parent, id, pos, size, 0, NULL,
style, validator, name );
if ( !Create( parent, id, pos, size, 0, NULL, style, validator, name ) )
return false;
Append( choices );
if ( !choices.empty() )
SetSelection( 0 );
SetInitialSize( size );
return true;
}
bool wxChoice::Create(wxWindow *parent,