summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-08-21 17:02:32 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-08-29 17:40:31 +0200
commita933a955c6278ecfbc7f14280b5b1090dee581e5 (patch)
tree86e0f8cdd1f4eb964b3e14dc4009ff69151ffef5 /chart2
parent2414270c396929490fe2b1b2afecd25075b21117 (diff)
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
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx7
1 files changed, 7 insertions, 0 deletions
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;
+ }
}
}