vcl/unx/gtk4/convert3to4.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 54fb6a903ecc0161e55e4ce35c13e391cb5eade4 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 10 16:23:59 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Aug 11 10:08:44 2022 +0200 gtk4: get submenu hierarchy right i.e deck sidebar menubutton dropdown Change-Id: Ib33d4ed8593c6c73b51c4de4d2da4b5036c8a723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138097 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index 5d9000232695..2c1554669119 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -165,7 +165,7 @@ MenuEntry ConvertMenu(css::uno::Reference<css::xml::dom::XNode>& xMenuSection, auto xNextChild = xChild->getNextSibling(); - auto xCurrentMenuSection = xMenuSection; + auto xSavedMenuSection = xMenuSection; if (xChild->getNodeName() == "object") { @@ -188,7 +188,7 @@ MenuEntry ConvertMenu(css::uno::Reference<css::xml::dom::XNode>& xMenuSection, = xDoc->createElement("section"); xMenuSection->getParentNode()->appendChild(xSection); xMenuSection = xSection; - xCurrentMenuSection = xMenuSection; + xSavedMenuSection = xMenuSection; } else if (sClass == "GtkMenu") { @@ -209,7 +209,8 @@ MenuEntry ConvertMenu(css::uno::Reference<css::xml::dom::XNode>& xMenuSection, = xDoc->createElement("section"); xSubMenu->appendChild(xSection); - xMenuSection = xSubMenu; + xMenuSection = xSection; + xSavedMenuSection = xMenuSection; } } @@ -224,7 +225,7 @@ MenuEntry ConvertMenu(css::uno::Reference<css::xml::dom::XNode>& xMenuSection, if (xChild->getNodeName() == "object") { - xMenuSection = xCurrentMenuSection; + xMenuSection = xSavedMenuSection; auto xDoc = xChild->getOwnerDocument();