framework/source/uielement/toolbarwrapper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 230a988c9011ffc365070acf9ecd750825b0b1ec
Author:     Maxim Monastirsky <momonas...@gmail.com>
AuthorDate: Thu Jun 16 13:24:24 2022 +0300
Commit:     Maxim Monastirsky <momonas...@gmail.com>
CommitDate: Fri Jun 17 14:00:14 2022 +0200

    tdf#125040 Ignore the default context
    
    This isn't a meaningful context, but a way to represent
    a lack of context. Typically it's a temporary state,
    followed by a proper context being set. The problem
    becomes apparent when a context deactivation is caused
    by switching to another document window, as the further
    activation will happen only when the former window is
    focused again. This makes the contextual controls
    disappear in the meantime.
    
    Change-Id: I96c8356acb2434c579dc74407043b55eb5374a0f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136010
    Tested-by: Jenkins
    Reviewed-by: Maxim Monastirsky <momonas...@gmail.com>

diff --git a/framework/source/uielement/toolbarwrapper.cxx 
b/framework/source/uielement/toolbarwrapper.cxx
index 9acbe7ca7b55..8f3937ef094f 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -269,7 +269,7 @@ void SAL_CALL ToolBarWrapper::notifyContextChangeEvent( 
const ContextChangeEvent
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( aEvent.ContextName.isEmpty() )
+    if ( aEvent.ContextName.isEmpty() || aEvent.ContextName == "default" )
         return;
 
     const OUString aContextToolbar( m_aResourceURL + "-" + 
aEvent.ContextName.toAsciiLowerCase() );

Reply via email to