[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 6 12:11:48 UTC 2019
vcl/unx/gtk3/gtk3gtkinst.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit f7bc0204a80a4f078c63f93b9892904686ad5b36
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 6 10:50:36 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 6 13:09:48 2019 +0100
erase matching container if notebook page removed
Change-Id: I15c1bb40f301684e58adcf7d366d7fa1bd171b04
Reviewed-on: https://gerrit.libreoffice.org/82136
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 584ffe3266c0..d67eb85a4d5e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -5366,11 +5366,13 @@ private:
return -1;
}
- void remove_page(GtkNotebook *pNotebook, const OString& rIdent)
+ int remove_page(GtkNotebook *pNotebook, const OString& rIdent)
{
disable_notify_events();
- gtk_notebook_remove_page(pNotebook, get_page_number(pNotebook, rIdent));
+ int nPageNumber = get_page_number(pNotebook, rIdent);
+ gtk_notebook_remove_page(pNotebook, nPageNumber);
enable_notify_events();
+ return nPageNumber;
}
static OUString get_tab_label_text(GtkNotebook *pNotebook, guint nPage)
@@ -5874,7 +5876,10 @@ public:
unsplit_notebooks();
reset_split_data();
}
- remove_page(m_pNotebook, rIdent);
+
+ unsigned int nPageIndex = remove_page(m_pNotebook, rIdent);
+ if (nPageIndex < m_aPages.size())
+ m_aPages.erase(m_aPages.begin() + nPageIndex);
}
virtual void append_page(const OString& rIdent, const OUString& rLabel) override
More information about the Libreoffice-commits
mailing list