Fix crash when changing wxQt wxScrollBar position

wxScrollBar::SetScrollbar() now blocks the signals of QScrollBar before
setting a value, which avoids behaviour where slots are called before
the QScrollBar is displayed.

Closes https://github.com/wxWidgets/wxWidgets/pull/1050
This commit is contained in:
Liam Treacy
2018-12-06 09:32:21 +00:00
committed by Vadim Zeitlin
parent 1ca3e264be
commit effdec75bd

View File

@@ -100,7 +100,9 @@ void wxScrollBar::SetScrollbar(int position, int WXUNUSED(thumbSize),
{
m_qtScrollBar->setRange( 0, range - pageSize );
m_qtScrollBar->setPageStep( pageSize );
m_qtScrollBar->blockSignals(true);
m_qtScrollBar->setValue( position );
m_qtScrollBar->blockSignals(false);
m_qtScrollBar->show();
}
else