]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ogl/samples/ogledit/ogledit.cpp
Removed small OGL glitches; added new sample
[wxWidgets.git] / utils / ogl / samples / ogledit / ogledit.cpp
index d6172e37dbb00a33a641dee6501ce2420f3e2928..87f19e6e857143d5bddb83195e3a7ffc79981860 100644 (file)
@@ -177,13 +177,11 @@ void MyFrame::OnSize(wxSizeEvent& event)
 
 void MyFrame::OnCloseWindow(wxCloseEvent& event)
 {
-  if (wxDocParentFrame::OnClose())
+  wxDocParentFrame::OnCloseWindow(event);
+  if (!event.GetVeto())
   {
     wxOGLCleanUp();
-    this->Destroy();
   }
-  else
-    event.Veto();
 }
 
 // Intercept menu commands