Description: A few lingering changes for wx3.0 support
Author: Olly Betts <olly@survex.com>
Forwarded: no
Last-Update: 2015-01-13

--- therion-5.3.16.orig/loch/lxGLC.cxx
+++ therion-5.3.16/loch/lxGLC.cxx
@@ -232,10 +232,6 @@ void lxGLCanvas::ForceRefresh(bool updat
 
 void lxGLCanvas::OnSize(wxSizeEvent& event)
 {
-
-  // this is also necessary to update the context on some platforms
-  wxGLCanvas::OnSize(event);
-
   // set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
   int w, h;
   this->GetClientSize(&w, &h);
@@ -246,6 +242,8 @@ void lxGLCanvas::OnSize(wxSizeEvent& eve
   this->ForceRefresh();
 #endif
 
+  // this is also necessary to update the context on some platforms
+  event.Skip();
 }
 
 
--- therion-5.3.16.orig/loch/lxGUI.cxx
+++ therion-5.3.16/loch/lxGUI.cxx
@@ -1076,6 +1076,7 @@ void lxFrame::ImportFile(wxString fName,
 
 
 void lxFrame::LoadData(wxString fName, int fType) {
+  {
 #if wxCHECK_VERSION(3,0,0)
   wxWindowDisabler disableAll;
 #endif
@@ -1109,14 +1110,6 @@ void lxFrame::LoadData(wxString fName, i
       this->data->m_input.InterpolateMissingLRUD();
       break;
   }
-#if wxCHECK_VERSION(3,0,0)
-  wxTheApp->Yield();
-#endif
-  if (this->data->m_input.m_error.length() > 0) {
-    wxMessageBox(_("Error reading input file"), _("Error"), wxICON_ERROR | wxOK);
-  } else {
-    this->m_fileHistory->AddFileToHistory(this->m_fileName);
-  }
   this->data->Rebuild();
 #if wxCHECK_VERSION(3,0,0)
   wxTheApp->Yield();
@@ -1126,6 +1119,14 @@ void lxFrame::LoadData(wxString fName, i
   wxTheApp->Yield();
 #endif
   this->canvas->UpdateRenderList();
+  }
+  // We need to have disengaged the wxWindowDisabler here or else we get an
+  // assertion failure for the wxMessageBox.
+  if (this->data->m_input.m_error.length() > 0) {
+    wxMessageBox(_("Error reading input file"), _("Error"), wxICON_ERROR | wxOK);
+  } else {
+    this->m_fileHistory->AddFileToHistory(this->m_fileName);
+  }
 }
 
 
