diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index 1791b11799..8a16b0c439 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -601,7 +601,7 @@ bool fmt_is_jpeg = FALSE; 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 --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 03ef581683..72c7196728 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -39,7 +39,7 @@ static void Draw3D_FilledSegmentWithHole(double startx, double starty, /**********************************/ -void Pcb3D_GLCanvas::Redraw( void ) +void Pcb3D_GLCanvas::Redraw( bool finish ) /**********************************/ { SetCurrent(); @@ -67,6 +67,7 @@ void Pcb3D_GLCanvas::Redraw( void ) } glFlush(); + if (finish) glFinish(); SwapBuffers(); } diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index e670e5020a..bb0be69b84 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -92,7 +92,7 @@ public: 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 );