summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-13 09:44:09 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-08-16 08:37:58 +0200
commit420fa261a1bb5db9c6367cd4bbf9984c79b296cc (patch)
tree04d149ffad086cb387e5e459b4a7133e116ac8a9
parentc5dbe94eb71acd9ab19cd9a8d561dd75da82d3d7 (diff)
tdf#139811 trigger layout when content changes
in writer styles panel of page deck which is similar to the draw case of tdf#143795. Doing this always in PanelLayout::queue_resize might make the most sense rather than these manual triggers, but do it this way initially for a safe backport. Change-Id: I4bd2e9cb9d52b66a73cd0615406052e19e6e8b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120369 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--sw/source/uibase/sidebar/PageStylesPanel.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 1815466c1df9..64260077a54c 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -27,6 +27,7 @@
#include <svx/xbtmpit.hxx>
#include <svx/SvxNumOptionsTabPageHelper.hxx>
#include "PageStylesPanel.hxx"
+#include <sfx2/sidebar/Panel.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
@@ -249,6 +250,11 @@ void PageStylesPanel::Update()
default:
break;
}
+
+ // 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)
+ pPanel->TriggerDeckLayouting();
}
Color const & PageStylesPanel::GetColorSetOrDefault()