From effdec75bde7765ce612f3dacd2cba1982430736 Mon Sep 17 00:00:00 2001 From: Liam Treacy Date: Thu, 6 Dec 2018 09:32:21 +0000 Subject: [PATCH] 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 --- src/qt/scrolbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/scrolbar.cpp b/src/qt/scrolbar.cpp index 99db6cc451..e848bf2c0c 100644 --- a/src/qt/scrolbar.cpp +++ b/src/qt/scrolbar.cpp @@ -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