summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2022-06-09 17:41:15 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2022-06-27 13:45:01 +0200
commit2f423a5feba085bad40ce53f512480507603c28c (patch)
tree13d16a29821972d69a23899c71d0a42934dd25d3
parent7bb8c3da46544227ca35413738c9a57238fff8a0 (diff)
jsdialog: toggle toolbox buttons correctlydistro/collabora/co-22.05
Change-Id: Ic02f9ceab29257ebc4cb6261aae10c4f1a7ef176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135562 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit b6b7b3a5a46790baf2266aaeb10976753dfe0fce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135539 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--vcl/jsdialog/executor.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 2da2ab5b9608..8e570ccbe2e4 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -325,8 +325,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;
}
}