summaryrefslogtreecommitdiffstats
path: root/Project/ControlEditorBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/ControlEditorBase.cpp')
-rw-r--r--Project/ControlEditorBase.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Project/ControlEditorBase.cpp b/Project/ControlEditorBase.cpp
index 1156e7b..6489c0f 100644
--- a/Project/ControlEditorBase.cpp
+++ b/Project/ControlEditorBase.cpp
@@ -136,6 +136,7 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt
}
#endif
// Connect events
+ this->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
this->Connect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this);
this->Connect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this);
m_glCanvas->Connect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
@@ -153,6 +154,7 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt
ControlEditorBase::~ControlEditorBase()
{
+ this->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
this->Disconnect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this);
this->Disconnect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this);
m_glCanvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);