[Libreoffice-commits] core.git: vcl/jsdialog

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 17 15:14:17 UTC 2021


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

New commits:
commit f5d3cfbc0b9bc34cc3297b8a1c179e4c158271b7
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jul 7 11:13:06 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Aug 17 17:13:55 2021 +0200

    jsdialog: don't send unnecessary close message
    
    Change-Id: I4077c0871c7e6faf4917ad22a1a3aae8eb972961
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118549
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120569
    Tested-by: Jenkins

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 03087e4fd82a..a376faed407d 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1352,6 +1352,7 @@ JSToolbar::JSToolbar(JSDialogSender* pSender, ::ToolBox* pToolbox, SalInstanceBu
 
 void JSToolbar::set_menu_item_active(const OString& rIdent, bool bActive)
 {
+    bool bWasActive = get_menu_item_active(rIdent);
     SalInstanceToolbar::set_menu_item_active(rIdent, bActive);
 
     ToolBoxItemId nItemId = m_xToolBox->GetItemId(OUString::fromUtf8(rIdent));
@@ -1370,7 +1371,7 @@ void JSToolbar::set_menu_item_active(const OString& rIdent, bool bActive)
             if (bActive)
                 sendPopup(pPopupRoot, m_xToolBox->get_id(),
                           OStringToOUString(rIdent, RTL_TEXTENCODING_ASCII_US));
-            else
+            else if (bWasActive)
                 sendClosePopup(pPopupRoot->GetLOKWindowId());
         }
     }


More information about the Libreoffice-commits mailing list