From 7ed760c4564834ec61ceb91f681dfc6daa1be4bd Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Thu, 9 Mar 2023 20:49:46 +0100 Subject: lok: some tunneled dialog control was not invalidated correctly This patch fixes a regression for commit: "lok: form controls: rendering and mouse event forwarding" Change-Id: Iffb0757834a884a6c86206221660da2a24bdff17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148564 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar --- vcl/source/control/ctrl.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'vcl') diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 689b02f80d79..943823e8f4f5 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -491,16 +491,17 @@ Control::GetUnzoomedControlPointFont() const void Control::LogicInvalidate(const tools::Rectangle* pRectangle) { - // avoid endless paint/invalidate loop in Impress - if (comphelper::LibreOfficeKit::isTiledPainting()) - return; - VclPtr pParent = GetParentWithLOKNotifier(); - if (!pParent) + if (!pParent || !dynamic_cast(GetParent())) + { + // if control doesn't belong to a DocWindow, the overriden base class + // method has to be invoked + Window::LogicInvalidate(pRectangle); return; + } - // invalidate only controls that belong to a DocWindow - if (!dynamic_cast(GetParent())) + // avoid endless paint/invalidate loop in Impress + if (comphelper::LibreOfficeKit::isTiledPainting()) return; tools::Rectangle aResultRectangle; -- cgit