sd/source/ui/sidebar/SlideBackground.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 4cb2e0eaf3731cef327d28d4692de68b4602adfb
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Nov 8 14:01:19 2021 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Nov 10 17:49:52 2021 +0100

    lok: hide useless insert image button in sidebar
    
    do this also in draw, not only in impress
    
    Change-Id: Iaaf2349cfb98b801957b71bd4504f0e9efbfba4e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124840
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124902
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index b372b25a2282..1df1099be972 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -334,14 +334,6 @@ void SlideBackground::HandleContextChange(
             mxInsertImage->show();
         }
 
-        // The Insert Image button in the sidebar issues .uno:SelectBackground,
-        // which when invoked without arguments will open the file-open-dialog
-        // to prompt the user to select a file. This is useless in LOOL.
-        // Hide for now so the user will only be able to use the menu to insert
-        // background image, which prompts the user for file selection in the 
browser.
-        if (comphelper::LibreOfficeKit::isActive())
-            mxInsertImage->hide();
-
         // Need to do a relayouting, otherwise the panel size is not updated 
after show / hide controls
         if (m_pPanel)
             m_pPanel->TriggerDeckLayouting();
@@ -363,6 +355,14 @@ void SlideBackground::HandleContextChange(
             mxBackgroundLabel->hide();
         }
     }
+
+    // The Insert Image button in the sidebar issues .uno:SelectBackground,
+    // which when invoked without arguments will open the file-open-dialog
+    // to prompt the user to select a file. This is useless in LOOL.
+    // Hide for now so the user will only be able to use the menu to insert
+    // background image, which prompts the user for file selection in the 
browser.
+    if (comphelper::LibreOfficeKit::isActive())
+        mxInsertImage->hide();
 }
 
 void SlideBackground::Update()

Reply via email to