[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/jsdialog

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 7 09:33:48 UTC 2021


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

New commits:
commit 181e970ad2699a8337ede6cb0583d4032a872b8c
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: Wed Jul 7 11:33:12 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>

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 4b19764d8031..474a0e1de3f5 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1358,6 +1358,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);
 
     sal_uInt16 nItemId = m_xToolBox->GetItemId(OUString::fromUtf8(rIdent));
@@ -1376,7 +1377,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