X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/173ca738fde8933598aea2d263fa8f045a597541..264f22613c68656b4e4a47b5be1eaca205eb31f1:/samples/opengl/cube/cube.cpp diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index b5f5ba419e..783ed604e7 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -243,7 +243,8 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event ) i != wxTopLevelWindows.end(); ++i ) { - (*i)->Refresh(false); + MyFrame *frame = (MyFrame *)*i; + frame->RefreshCanvas(); } } @@ -287,3 +288,7 @@ void MyFrame::OnNewWindow( wxCommandEvent& WXUNUSED(event) ) (void) new MyFrame(); } +void MyFrame::RefreshCanvas() +{ + m_canvas->Refresh(false); +}