Fix wxRA_SPECIFY_{ROWS,COLS} handling in wxQt wxRadioBox

Their meanings were previously reversed.

Closes https://github.com/wxWidgets/wxWidgets/pull/978
This commit is contained in:
Cătălin Răceanu 2018-10-16 05:58:27 +03:00 committed by Vadim Zeitlin
parent aeb68e9861
commit 88b7ef2fab

View File

@ -135,9 +135,13 @@ bool wxRadioBox::Create(wxWindow *parent,
m_qtGroupBox->setTitle( wxQtConvertString( title ) );
m_qtButtonGroup = new wxQtButtonGroup( m_qtGroupBox, this );
if ( style & wxRA_SPECIFY_ROWS )
// wxRA_SPECIFY_COLS means that we arrange buttons in
// left to right order and GetMajorDim() is the number of columns while
// wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
// GetMajorDim() is the number of rows.
if ( style & wxRA_SPECIFY_COLS )
m_qtBoxLayout = new QHBoxLayout;
else if ( style & wxRA_SPECIFY_COLS )
else if ( style & wxRA_SPECIFY_ROWS )
m_qtBoxLayout = new QVBoxLayout;
AddChoices< QRadioButton >( m_qtButtonGroup, m_qtBoxLayout, n, choices );