← Back to team overview

kicad-developers team mailing list archive

Re: 3D-Viewer - Request for merge evaluation

 

Le 21/06/2016 à 10:41, Mário Luzeiro a écrit :
> Hi JP,
> 
> I was comparing your build with mine, the big differences are Windows 7 32vs64bits and wxWidgets 3.0.2 vs 3.1
> 
> I tried to update wxWidgets on msys2 but it says they are updated.
> How do I update mine to 3.1?
> 

the 3.1 version is built by myself, from sources.

I am not sure it makes difference with 3.0.2.

I fixed the display freeze by slightly modify the EDA_3D_CANVAS::OnPaint( wxPaintEvent &event ) method:

I removed:
event.Skip( false ); (not useful)
and
wxPaintDC( this );
This is when deleting this line i do not have any freeze.

In OpenGL samples, you can see wxPaintDC pdc( this ) in paint events, but now I am thinking it is
not needed and can (and perhaps must) be removed (I am thinking the associated comments are very
old) at least in wxWdgets 3.0

Moreover, in wxWidgets compiled with GTK3, in the EDA_3D_CANVAS::OnPaint(), I have an assert error
for wxPaintDC pdc( this )
(wxPaintDC not allowed in non native Paint events).

Therefore I think now wxGLCanvas::OnPaint() in a special case, and does not need a wxPaintDC
declaration.


Here is my change:
=== modifié fichier 3d-viewer/3d_canvas/eda_3d_canvas.cpp
--- 3d-viewer/3d_canvas/eda_3d_canvas.cpp	2016-06-18 23:25:00 +0000
+++ 3d-viewer/3d_canvas/eda_3d_canvas.cpp	2016-06-21 08:36:39 +0000
@@ -253,10 +253,6 @@

 void EDA_3D_CANVAS::OnPaint( wxPaintEvent &event )
 {
-    wxPaintDC( this );
-
-    event.Skip( false );
-
     // SwapBuffer requires the window to be shown before calling
     if( !IsShownOnScreen() )
     {


-- 
Jean-Pierre CHARRAS


Follow ups

References