- bugfix for map editor hanging on some windows installations

This commit is contained in:
Mark Vejvoda
2013-11-17 22:42:51 +00:00
parent 7830785e7f
commit b74271348c

View File

@@ -634,7 +634,9 @@ void MainWindow::onPaint(wxPaintEvent &event) {
return;
}
#if wxCHECK_VERSION(2, 9, 1)
#if wxCHECK_VERSION(2, 9, 3)
#elif wxCHECK_VERSION(2, 9, 1)
glCanvas->setCurrentGLContext();
#endif
@@ -1445,6 +1447,13 @@ GlCanvas::~GlCanvas() {
void GlCanvas::setCurrentGLContext() {
#ifndef __APPLE__
#if wxCHECK_VERSION(2, 9, 1)
if(this->context == NULL) {
this->context = new wxGLContext(this);
}
#endif
if(this->context) {
this->SetCurrent(*this->context);
}