Fix setting initial value of wxSpinCtrl in wxQt
When creating a QSpinBox, the range must be set before setting the initial value as otherwise setting it would fail if it were outside of the default [0, 99] range. This fixes a test failure in the corresponding unit test. Closes https://github.com/wxWidgets/wxWidgets/pull/1041
This commit is contained in:
committed by
Vadim Zeitlin
parent
94a58121f7
commit
928b00ad55
@@ -42,8 +42,8 @@ bool wxSpinCtrlQt< T, Widget >::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_qtSpinBox->setAccelerated(true); // to match gtk behavior
|
m_qtSpinBox->setAccelerated(true); // to match gtk behavior
|
||||||
|
|
||||||
SetValue( initial );
|
|
||||||
SetRange( min, max );
|
SetRange( min, max );
|
||||||
|
SetValue( initial );
|
||||||
SetIncrement( inc );
|
SetIncrement( inc );
|
||||||
|
|
||||||
if ( !value.IsEmpty() )
|
if ( !value.IsEmpty() )
|
||||||
|
Reference in New Issue
Block a user