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:
committed by
Vadim Zeitlin
parent
2969cefb3a
commit
3f2db1b027
@@ -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 )
|
||||
|
Reference in New Issue
Block a user