vcl/jsdialog/executor.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 001d9a20ae3607e618a8fb0889ab2f2bcb612f4f Author: Szymon Kłos <eszka...@gmail.com> AuthorDate: Thu Jun 9 17:41:15 2022 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Wed Jun 29 12:42:52 2022 +0200 jsdialog: toggle toolbox buttons correctly Change-Id: Ic02f9ceab29257ebc4cb6261aae10c4f1a7ef176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135562 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit b6b7b3a5a46790baf2266aaeb10976753dfe0fce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135539 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136605 Tested-by: Jenkins diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 4489949a91b5..24a5f9ba596d 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -314,8 +314,9 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM } else if (sAction == "togglemenu") { - pToolbar->set_menu_item_active( - OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US), true); + OString sId = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); + bool bIsActive = pToolbar->get_menu_item_active(sId); + pToolbar->set_menu_item_active(sId, !bIsActive); return true; } }