mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 05:05:56 +08:00
Removed GLCanvas3D::on_key_down() handler, as it is replaced
by the on_char() handler.
This commit is contained in:
parent
0c1f750cba
commit
14a623f50e
@ -5056,7 +5056,6 @@ void GLCanvas3D::bind_event_handlers()
|
||||
m_canvas->Bind(wxEVT_MIDDLE_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Bind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Bind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
||||
m_canvas->Bind(wxEVT_KEY_DOWN, &GLCanvas3D::on_key_down, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5070,7 +5069,7 @@ void GLCanvas3D::unbind_event_handlers()
|
||||
m_canvas->Unbind(wxEVT_MOUSEWHEEL, &GLCanvas3D::on_mouse_wheel, this);
|
||||
m_canvas->Unbind(wxEVT_TIMER, &GLCanvas3D::on_timer, this);
|
||||
m_canvas->Unbind(wxEVT_LEFT_DOWN, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_LEFT_UP, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_LEFT_UP, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_MIDDLE_DOWN, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_MIDDLE_UP, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_RIGHT_DOWN, &GLCanvas3D::on_mouse, this);
|
||||
@ -5082,7 +5081,6 @@ void GLCanvas3D::unbind_event_handlers()
|
||||
m_canvas->Unbind(wxEVT_MIDDLE_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
||||
m_canvas->Unbind(wxEVT_KEY_DOWN, &GLCanvas3D::on_key_down, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5669,24 +5667,6 @@ void GLCanvas3D::on_paint(wxPaintEvent& evt)
|
||||
this->render();
|
||||
}
|
||||
|
||||
void GLCanvas3D::on_key_down(wxKeyEvent& evt)
|
||||
{
|
||||
if (evt.HasModifiers())
|
||||
evt.Skip();
|
||||
else
|
||||
{
|
||||
int key = evt.GetKeyCode();
|
||||
#ifdef __WXOSX__
|
||||
if (key == WXK_BACK)
|
||||
#else
|
||||
if (key == WXK_DELETE)
|
||||
#endif // __WXOSX__
|
||||
post_event(SimpleEvent(EVT_GLCANVAS_REMOVE_OBJECT));
|
||||
else
|
||||
evt.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
Size GLCanvas3D::get_canvas_size() const
|
||||
{
|
||||
int w = 0;
|
||||
|
@ -1043,7 +1043,6 @@ public:
|
||||
void on_timer(wxTimerEvent& evt);
|
||||
void on_mouse(wxMouseEvent& evt);
|
||||
void on_paint(wxPaintEvent& evt);
|
||||
void on_key_down(wxKeyEvent& evt);
|
||||
|
||||
Size get_canvas_size() const;
|
||||
Point get_local_mouse_position() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user