From fdeada8c50c3e9126537ceafc649c85dc4be598c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 29 Mar 2019 13:51:50 +0000 Subject: tdf#124410 re-call SetScrollBarRange when aSymbolSet changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and do the work that depends on size happen at size-changed instead of first-draw Change-Id: Ia2605ba9bb875be9248a009a6f26f01cbbbd4632 Reviewed-on: https://gerrit.libreoffice.org/69928 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- starmath/source/dialog.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'starmath/source/dialog.cxx') diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index b8fae68c547a..a9b77d1ca40b 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -940,15 +940,19 @@ Point SmShowSymbolSet::OffsetPoint(const Point &rPoint) const return Point(rPoint.X() + nXOffset, rPoint.Y() + nYOffset); } -void SmShowSymbolSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) +void SmShowSymbolSet::Resize() { + CustomWidgetController::Resize(); Size aWinSize(GetOutputSizePixel()); if (aWinSize != m_aOldSize) { - calccols(rRenderContext); + calccols(GetDrawingArea()->get_ref_device()); m_aOldSize = aWinSize; } +} +void SmShowSymbolSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) +{ Color aBackgroundColor; Color aTextColor; lclGetSettingColors(aBackgroundColor, aTextColor); @@ -1088,6 +1092,7 @@ void SmShowSymbolSet::calccols(const vcl::RenderContext& rRenderContext) void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet) { aSymbolSet = rSymbolSet; + SetScrollBarRange(); Invalidate(); } -- cgit