diff options
Diffstat (limited to 'src/game_tab/right_panel/editor/EditorCanvas.cpp')
| -rw-r--r-- | src/game_tab/right_panel/editor/EditorCanvas.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game_tab/right_panel/editor/EditorCanvas.cpp b/src/game_tab/right_panel/editor/EditorCanvas.cpp index 0a32589..b65ece8 100644 --- a/src/game_tab/right_panel/editor/EditorCanvas.cpp +++ b/src/game_tab/right_panel/editor/EditorCanvas.cpp @@ -6,6 +6,8 @@ EditorCanvas::EditorCanvas(wxFrame *parent) CGEditor::status.MoveIconWidth)); t.ResizePieces(CGEditor::status.MoveIconWidth); default_font=wxFont(*wxNORMAL_FONT).MakeBold(); + Bind(wxEVT_KEY_DOWN, [p=this](wxKeyEvent &e){e.ResumePropagation(1);e.Skip();}); + Bind(wxEVT_KEY_UP, [p=this](wxKeyEvent &e){e.ResumePropagation(1);e.Skip();}); } void EditorCanvas::OnPaint(wxPaintEvent &event) { @@ -236,5 +238,4 @@ void EditorCanvas::OnKeyEvent(wxKeyEvent &event) { } wxBEGIN_EVENT_TABLE(EditorCanvas, wxPanel) EVT_PAINT(EditorCanvas::OnPaint) - EVT_MOUSE_EVENTS(EditorCanvas::MouseEvent) - EVT_CHAR_HOOK(EditorCanvas::OnKeyEvent) wxEND_EVENT_TABLE() + EVT_MOUSE_EVENTS(EditorCanvas::MouseEvent) wxEND_EVENT_TABLE() |
