vcl/unx/gtk3/gtk3gtkinst.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
New commits: commit 44238792b59e9931667d6e7303f86a75a88a8620 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Feb 21 17:19:18 2019 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Mar 7 18:15:50 2019 +0100 wrong "to-page" reported in split notebooks and when switching decks we need that notification to occur too Change-Id: Ica3c83ad34e072faf044c6d4667f34756688de09 Reviewed-on: https://gerrit.libreoffice.org/68172 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index e81f451f7fa0..b130fe5d4747 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3068,6 +3068,13 @@ private: void signal_switch_page(int nNewPage) { + if (m_bOverFlowBoxIsStart) + { + auto nOverFlowLen = m_bOverFlowBoxActive ? gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1 : 0; + // add count of overflow pages, minus the extra tab + nNewPage += nOverFlowLen; + } + bool bAllow = !m_aLeavePageHdl.IsSet() || m_aLeavePageHdl.Call(get_current_page_ident()); if (!bAllow) { @@ -3131,9 +3138,11 @@ private: std::swap(m_nStartTabCount, m_nEndTabCount); split_notebooks(); - gtk_notebook_set_current_page(m_pNotebook, nNewPage); - enable_notify_events(); + + // we want to call this outside enable_notify_events so that the main + // notebook switch-page callback is triggered + gtk_notebook_set_current_page(m_pNotebook, nNewPage); } static OString get_page_ident(GtkNotebook *pNotebook, guint nPage) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits