Request refresh of 3d canvas on resize event

This is a partial fix for https://bugs.launchpad.net/kicad/+bug/1695897
This commit is contained in:
Thomas Pointhuber 2017-07-25 18:09:22 +02:00 committed by Chris Pavlina
parent 33cbbc95d9
commit 786ac8143e
2 changed files with 7 additions and 0 deletions

View File

@ -82,6 +82,7 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, wxGLCanvas )
ID_POPUP_3D_VIEW_END, EDA_3D_CANVAS::OnPopUpMenu )
EVT_CLOSE( EDA_3D_CANVAS::OnCloseWindow )
EVT_SIZE( EDA_3D_CANVAS::OnResize )
END_EVENT_TABLE()
@ -188,6 +189,10 @@ void EDA_3D_CANVAS::OnCloseWindow( wxCloseEvent &event )
event.Skip();
}
void EDA_3D_CANVAS::OnResize( wxSizeEvent &event )
{
this->Request_refresh();
}
bool EDA_3D_CANVAS::initializeOpenGL()
{

View File

@ -159,6 +159,8 @@ class EDA_3D_CANVAS : public HIDPI_GL_CANVAS
*/
void OnCloseWindow( wxCloseEvent &event );
void OnResize( wxSizeEvent &event );
void OnTimerTimeout_Redraw( wxTimerEvent& event );
DECLARE_EVENT_TABLE()