Append all items at once during wxChoice creation in wxMSW.
Appending all items at once is more efficient than doing it one by one in the loop 9probably because of CB_INITSTORAGE that we send in this case). Closes #13899. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,10 +86,7 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
|
|||||||
|
|
||||||
|
|
||||||
// initialize the controls contents
|
// initialize the controls contents
|
||||||
for ( int i = 0; i < n; i++ )
|
Append(n, choices);
|
||||||
{
|
|
||||||
Append(choices[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// and now we may finally size the control properly (if needed)
|
// and now we may finally size the control properly (if needed)
|
||||||
SetInitialSize(size);
|
SetInitialSize(size);
|
||||||
|
Reference in New Issue
Block a user