vcl/jsdialog/jsdialogbuilder.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6b3b85d3f7093bc591a710394d0e81262573d72b
Author:     Szymon Kłos <[email protected]>
AuthorDate: Mon Oct 23 15:26:28 2023 +0200
Commit:     Szymon Kłos <[email protected]>
CommitDate: Fri Oct 27 08:50:04 2023 +0200

    jsdialog: don't send  update in toolbox when not modified
    
    Change-Id: I74087b54f9844ea5d22de03caf8724d38d525646
    (cherry picked from commit 9d44086770d9a1c625d42676033f47a698dfa572)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158446
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 47743ac5ffc7..3dcfcdcbd391 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1965,8 +1965,10 @@ void JSToolbar::set_menu_item_active(const OUString& 
rIdent, bool bActive)
 
 void JSToolbar::set_item_sensitive(const OUString& rIdent, bool bSensitive)
 {
+    bool bWasSensitive = get_item_sensitive(rIdent);
     SalInstanceToolbar::set_item_sensitive(rIdent, bSensitive);
-    sendUpdate();
+    if (bWasSensitive != bSensitive)
+        sendUpdate();
 }
 
 void JSToolbar::set_item_icon_name(const OUString& rIdent, const OUString& 
rIconName)

Reply via email to