Set wxGauge initial value correctly in wxQt

The default value of QProgressBar is -1, while wxGauge initial value
must be 0, so set it explicitly to fix a unit test failure with wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1043
This commit is contained in:
Liam Treacy
2018-12-05 14:36:01 +00:00
committed by Vadim Zeitlin
parent f271cc61e8
commit 729295d02f

View File

@@ -58,6 +58,7 @@ bool wxGauge::Create(wxWindow *parent,
m_qtProgressBar->setOrientation( wxQtConvertOrientation( style, wxGA_HORIZONTAL ));
m_qtProgressBar->setRange( 0, range );
m_qtProgressBar->setTextVisible( style & wxGA_TEXT );
m_qtProgressBar->setValue(0);
return QtCreateControl( parent, id, pos, size, style, validator, name );
}