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

New commits:
commit 8e67e3e5e1da4e1a1fc6e7c0197b6b08fcd50d45
Author:     Szymon Kłos <[email protected]>
AuthorDate: Mon Nov 8 14:01:19 2021 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Nov 8 14:40:54 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 <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 0ba486884b25..6ed5af536527 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -328,14 +328,6 @@ void SlideBackground::HandleContextChange(
             mpInsertImage->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())
-            mpInsertImage->Hide();
-
         // Need to do a relayouting, otherwise the panel size is not updated 
after show / hide controls
         sfx2::sidebar::Panel* pPanel = 
dynamic_cast<sfx2::sidebar::Panel*>(GetParent());
         if(pPanel)
@@ -357,6 +349,14 @@ void SlideBackground::HandleContextChange(
             mpBackgroundLabel->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())
+        mpInsertImage->Hide();
 }
 
 void SlideBackground::Update()

Reply via email to