From a933a955c6278ecfbc7f14280b5b1090dee581e5 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Thu, 21 Aug 2014 17:02:32 +0200 Subject: Reinitialize GL3D renderer when OpenGL window is changed Without it when we switch sheets in Calc or slides in Impress and go back to that page where the GL3DBar chart is then the renderer does not work. Change-Id: I9aa6203ed5aa7f94627d886b2f2e5ad34d493843 --- chart2/source/view/charttypes/GL3DBarChart.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chart2') diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 52a6bc78e14a..ed5cb2f3f091 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -1313,7 +1313,14 @@ IMPL_LINK_NOARG(GL3DBarChart, updateTimer) void GL3DBarChart::setOpenGLWindow(OpenGLWindow* pWindow) { if (mpWindow != pWindow) + { mpWindow = pWindow; + Size aSize = mpWindow->GetSizePixel(); + mpRenderer->SetSize(aSize); + mpWindow->setRenderer(this); + mpRenderer->init(); + mbValidContext = true; + } } } -- cgit