vcl/source/window/builder.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 40efd2177027645b93b57016b75943dcca779139 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 6 14:40:55 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Mar 7 20:27:30 2020 +0100 after inserting a widget into a toolbar make the toolbar the parent again Change-Id: I2e814215225e2617d63dd6eccfc2a48f056b1f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 7d7b87208dda..f44dabce534c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2776,7 +2776,10 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString rAtk.clear(); if (!pCurrentChild) - pCurrentChild = m_aChildren.empty() ? pParent : m_aChildren.back().m_pWindow.get(); + { + bool bToolbarParent = (pParent && pParent->GetType() == WindowType::TOOLBOX); + pCurrentChild = (m_aChildren.empty() || bToolbarParent) ? pParent : m_aChildren.back().m_pWindow.get(); + } return pCurrentChild; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits