From b07163d73a28e7792011edddf246726919364a26 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 30 Sep 2016 12:40:47 +0200 Subject: tdf#102852 Fixed BreakDlg Needed to ensure correct return value in dialog and that it repaints Change-Id: I029d10b6699629b2f2f8651f6d96ceceba7a3d8c Reviewed-on: https://gerrit.libreoffice.org/29401 Tested-by: Jenkins Reviewed-by: Armin Le Grand --- vcl/source/window/dialog.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 5884a7316c40..eef4c5ab5018 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -863,14 +863,8 @@ bool Dialog::selectPageByUIXMLDescription(const OString& /*rUIXMLDescription*/) return true; } -Bitmap Dialog::createScreenshot() +void Dialog::ensureRepaint() { - // same prerequisites as in Execute() - setDeferredProperties(); - ImplAdjustNWFSizes(); - Show(); - ToTop(); - // ensure repaint Invalidate(); mbPaintComplete = false; @@ -879,6 +873,16 @@ Bitmap Dialog::createScreenshot() { Application::Yield(); } +} + +Bitmap Dialog::createScreenshot() +{ + // same prerequisites as in Execute() + setDeferredProperties(); + ImplAdjustNWFSizes(); + Show(); + ToTop(); + ensureRepaint(); return GetBitmap(Point(), GetOutputSizePixel()); } -- cgit