summaryrefslogtreecommitdiff
path: root/vcl/source/control/ctrl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/ctrl.cxx')
-rw-r--r--vcl/source/control/ctrl.cxx15
1 files changed, 8 insertions, 7 deletions
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<vcl::Window> pParent = GetParentWithLOKNotifier();
- if (!pParent)
+ if (!pParent || !dynamic_cast<vcl::DocWindow*>(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<vcl::DocWindow*>(GetParent()))
+ // avoid endless paint/invalidate loop in Impress
+ if (comphelper::LibreOfficeKit::isTiledPainting())
return;
tools::Rectangle aResultRectangle;