[Libreoffice-commits] core.git: Branch 'feature/chart_opengl_window' - chart2/source

Zolnai Tamás tamas.zolnai at collabora.com
Fri Aug 22 01:11:23 PDT 2014


 chart2/source/controller/main/ChartWindow.cxx |   16 ++++++++++++++++
 chart2/source/view/main/ChartView.cxx         |    1 +
 2 files changed, 17 insertions(+)

New commits:
commit d4a6f8a96a4521bc8395fd8d639727e7b5cbc665
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Fri Aug 22 10:08:07 2014 +0200

    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

diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index dde5006..fc0aab9 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 fa7f415..07e6c281 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -164,6 +164,7 @@ GL2DRenderer::~GL2DRenderer()
 
 void GL2DRenderer::update()
 {
+    mpView->update();
     mpView->render();
 }
 


More information about the Libreoffice-commits mailing list