it is very strange. I've compiled the latest version You packaged and
it works! With wxWidgets 2.6. Screenshots attached.

I now I see why...

And this is a diff beetween kicad-2007-01-15 and kicad-2007-05-25. I
think this one line is the fix for the problem...

+       wxYield();      // Requested to allow tne window redraw after closing

Luck of the (re)draw! It's a timing condition, and the yield will improve the chances a little, especially if there is something to actually yield to. In my testing with the 05/25 release, with this "fix" in, it still didn't work.

Here is a better fix, this makes sure the redraw has fully taken place. I'll get this included in the my next upload. I'll also forward it upstream.

Richard.

diff -Nur kicad-0.0.20070525.orig/3d-viewer/3d_canvas.cpp kicad-0.0.20070525/3d-viewer/3d_canvas.cpp --- kicad-0.0.20070525.orig/3d-viewer/3d_canvas.cpp 2007-05-28 19:47:34.000000000 +0100 +++ kicad-0.0.20070525/3d-viewer/3d_canvas.cpp 2007-05-28 19:59:04.000000000 +0100
@@ -601,7 +601,7 @@
                if ( FullFileName.IsEmpty() ) return;
        }

- wxYield(); // Requested to allow tne window redraw after closing the dialog box
+       Redraw(true);
        wxSize image_size = GetClientSize();
        wxClientDC dc(this);
        wxBitmap bitmap(image_size.x, image_size.y );
diff -Nur kicad-0.0.20070525.orig/3d-viewer/3d_draw.cpp kicad-0.0.20070525/3d-viewer/3d_draw.cpp --- kicad-0.0.20070525.orig/3d-viewer/3d_draw.cpp 2007-05-28 19:47:30.000000000 +0100 +++ kicad-0.0.20070525/3d-viewer/3d_draw.cpp 2007-05-28 20:02:55.000000000 +0100
@@ -39,7 +39,7 @@


/**********************************/
-void Pcb3D_GLCanvas::Redraw( void )
+void Pcb3D_GLCanvas::Redraw( bool finish )
/**********************************/
{
    SetCurrent();
@@ -67,6 +67,7 @@
        }

        glFlush();
+       if (finish) glFinish();
        SwapBuffers();
 }

diff -Nur kicad-0.0.20070525.orig/3d-viewer/3d_viewer.h kicad-0.0.20070525/3d-viewer/3d_viewer.h --- kicad-0.0.20070525.orig/3d-viewer/3d_viewer.h 2007-05-28 19:47:02.000000000 +0100 +++ kicad-0.0.20070525/3d-viewer/3d_viewer.h 2007-05-28 19:58:57.000000000 +0100
@@ -92,7 +92,7 @@
        void TakeScreenshot(wxCommandEvent & event);

        void SetView3D(int keycode);

        void DisplayStatus(void);

-       void Redraw(void);

+       void Redraw(bool finish = false);

        GLuint DisplayCubeforTest(void);



        void OnEnterWindow( wxMouseEvent& event );

_________________________________________________________________
Like the way Microsoft Office Outlook works? You’ll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to