summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-08-22 10:08:07 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-08-29 17:40:32 +0200
commit8e37097d52e8a52ee4a9ea7c87d9fac4b3feef8b (patch)
treedce566fe40f2eb803177a9db68a27fa973778cd4 /chart2
parenta933a955c6278ecfbc7f14280b5b1090dee581e5 (diff)
Update chart when chart type is changed in edit mode
Regression to master. In long term it would be better to define ChartWindow as an OpenGL window and not creating a new window inside the chart window, becasue otherwise all events which was handled well by the chart window will be broken (catched by the OpenGL window so no effect on ChartWindow (defining the behavior of charts in general) or catched by the ChartWindow and so no effect on the OpenGLWindow (like invalidating in this case). Change-Id: I234f469f70914e01f030c8edae9cb5aacea112bf
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx16
-rw-r--r--chart2/source/view/main/ChartView.cxx1
2 files changed, 17 insertions, 0 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index dde5006aa874..fc0aab92c2d5 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -265,24 +265,40 @@ void ChartWindow::adjustHighContrastMode()
void ChartWindow::ForceInvalidate()
{
::Window::Invalidate();
+ if(m_pOpenGLWindow)
+ {
+ m_pOpenGLWindow->Invalidate();
+ }
}
void ChartWindow::Invalidate( sal_uInt16 nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
::Window::Invalidate( nFlags );
+ if(m_pOpenGLWindow)
+ {
+ m_pOpenGLWindow->Invalidate( nFlags );
+ }
}
void ChartWindow::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
::Window::Invalidate( rRect, nFlags );
+ if(m_pOpenGLWindow)
+ {
+ m_pOpenGLWindow->Invalidate( rRect, nFlags );
+ }
}
void ChartWindow::Invalidate( const Region& rRegion, sal_uInt16 nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
::Window::Invalidate( rRegion, nFlags );
+ if(m_pOpenGLWindow)
+ {
+ m_pOpenGLWindow->Invalidate( rRegion, nFlags );
+ }
}
} //namespace chart
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 39f9be820270..a6d8a5a7a510 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -165,6 +165,7 @@ GL2DRenderer::~GL2DRenderer()
void GL2DRenderer::update()
{
+ mpView->update();
mpView->render();
}