summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-07 20:27:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-08 20:24:23 +0200
commit10a5df7de19c86b362976b4bd8cee32da4413547 (patch)
tree9010d346d275cf716ec3831f4fbcd217beb91ebd /vcl/source
parent2b196f3bb75dc8bea0f70b842b829394a7e0c097 (diff)
improve weld::Widget::draw rendering a widget
Change-Id: I1f49e3e7829f41d7eb4ffc137a9b0ab5c47d2cce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98375 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 81c2e38085c3..4121165b37a5 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1137,7 +1137,10 @@ void SalInstanceWidget::draw(OutputDevice& rOutput, const tools::Rectangle& rRec
{
Size aOrigSize(m_xWidget->GetSizePixel());
m_xWidget->SetSizePixel(rRect.GetSize());
+ rOutput.Push(PushFlags::CLIPREGION);
+ rOutput.IntersectClipRegion(rRect);
m_xWidget->Draw(&rOutput, rRect.TopLeft(), DrawFlags::NONE);
+ rOutput.Pop();
m_xWidget->SetSizePixel(aOrigSize);
}