summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-09-30 19:09:32 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2020-10-12 09:13:31 +0200
commit306891f88b859c5544b8e1e4a1b2f3bec1896b17 (patch)
tree4359518a5bcc572e47847b3693a2e114871e9012
parent53bd76e8f193baf667077eb52d06e3c244964819 (diff)
Allow invalidate after queue_resize for lok in sidebar
This is a fix for regression introduced by 61a35560cb412d7ab0e3d0574eec4a790e3b9dfd Sidebar wasn't properly refreshed in Online eg. in Impress change 'Background' in sidebar 'Slide' deck to 'Color' -> resulted in overlapping content Change-Id: Id64f5d8694908d28cf5fa9787b65e555fb317e35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103724 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104012 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--vcl/source/window/window2.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 23557868dd4c..e435d890861e 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1311,6 +1311,19 @@ void Window::InvalidateSizeCache()
pWindowImpl->mnOptimalHeightCache = -1;
}
+static bool HasParentDockingWindow(const vcl::Window* pWindow)
+{
+ while( pWindow )
+ {
+ if( pWindow->IsDockingWindow() )
+ return true;
+
+ pWindow = pWindow->GetParent();
+ }
+
+ return pWindow && pWindow->IsDockingWindow();
+}
+
void Window::queue_resize(StateChangedType eReason)
{
if (IsDisposed())
@@ -1346,7 +1359,8 @@ void Window::queue_resize(StateChangedType eReason)
if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
{
Size aSize = GetSizePixel();
- if (!aSize.IsEmpty() && GetParentDialog() && !pParent->IsInInitShow())
+ if (!aSize.IsEmpty() && !pParent->IsInInitShow()
+ && (GetParentDialog() || HasParentDockingWindow(this)))
LogicInvalidate(nullptr);
}
}