From 9a64acbb79fffa1e51c7845d0ea3e05735916837 Mon Sep 17 00:00:00 2001 From: Mick Waites Date: Tue, 18 Jun 2019 10:51:25 +0100 Subject: [PATCH] Ensure correct previous page is sent for notebook events Qt notebook page changed events had the wrong "previous page" index in circumstances where the page has been changed by methods other than clicking on the tabs, for example using the "Pages->Next page" menu option in the notebook sample. Closes https://github.com/wxWidgets/wxWidgets/pull/1359 --- src/qt/notebook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/notebook.cpp b/src/qt/notebook.cpp index 0f4c2ae062..ade55ec5f1 100644 --- a/src/qt/notebook.cpp +++ b/src/qt/notebook.cpp @@ -192,8 +192,8 @@ int wxNotebook::SetSelection(size_t page) int selOld = GetSelection(); // change the QTabWidget selected page: - m_selection = page; m_qtTabWidget->setCurrentIndex( page ); + m_selection = page; return selOld; }