[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 7 19:28:16 UTC 2020
vcl/source/window/builder.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 40efd2177027645b93b57016b75943dcca779139
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 6 14:40:55 2020 +0000
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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;
}
More information about the Libreoffice-commits
mailing list