diff --git a/include/wx/qt/glcanvas.h b/include/wx/qt/glcanvas.h index c08889e125..743ef5901a 100644 --- a/include/wx/qt/glcanvas.h +++ b/include/wx/qt/glcanvas.h @@ -54,6 +54,8 @@ public: const wxString& name = wxGLCanvasName, const wxPalette& palette = wxNullPalette); + ~wxGLCanvas(); + bool Create(wxWindow *parent, const wxGLAttributes& dispAttrs, wxWindowID id = wxID_ANY, diff --git a/src/qt/glcanvas.cpp b/src/qt/glcanvas.cpp index 5713a57f8a..29e6c09dd7 100644 --- a/src/qt/glcanvas.cpp +++ b/src/qt/glcanvas.cpp @@ -377,6 +377,12 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, Create(parent, id, pos, size, style, name, attribList, palette); } +wxGLCanvas::~wxGLCanvas() +{ + // Avoid sending further signals (i.e. if deleting the current page) + m_qtWindow->blockSignals(true); +} + bool wxGLCanvas::Create(wxWindow *parent, const wxGLAttributes& dispAttrs, wxWindowID id,