Fix item index in wxRadioBox events in wxQt

Use 0-based index for the radio box items, as in the other ports,
instead of auto-generated values.

Closes https://github.com/wxWidgets/wxWidgets/pull/1127
This commit is contained in:
Graham Dawes
2019-01-09 13:17:15 +00:00
committed by Vadim Zeitlin
parent 2969cefb3a
commit 3f2db1b027

View File

@@ -116,10 +116,12 @@ static void AddChoices( QButtonGroup *qtButtonGroup, QBoxLayout *qtBoxLayout, in
Button *btn;
bool isFirst = true;
int id = 0;
while ( count-- > 0 )
{
btn = new Button( wxQtConvertString( *choices++ ));
qtButtonGroup->addButton( btn );
qtButtonGroup->addButton( btn, id++ );
qtBoxLayout->addWidget( btn );
if ( isFirst )