Skip to content

Commit

Permalink
ENH: delete objects/parts by back key on macOS
Browse files Browse the repository at this point in the history
Signed-off-by: yifan.wu <[email protected]>
Change-Id: I4fb5a940955a3f165fe61b7499509c5c72c53460
  • Loading branch information
YifanWuBambu authored and lanewei120 committed Oct 20, 2022
1 parent f3c65f8 commit 368badd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/slic3r/GUI/GLCanvas3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2410,6 +2410,10 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
{
//case WXK_BACK:
case WXK_DELETE: { post_event(SimpleEvent(EVT_GLTOOLBAR_DELETE)); break; }
// BBS
#ifdef __APPLE__
case WXK_BACK: { post_event(SimpleEvent(EVT_GLTOOLBAR_DELETE)); break; }
#endif
case WXK_ESCAPE: { deselect_all(); break; }
//case WXK_F5: {
// if ((wxGetApp().is_editor() && !wxGetApp().plater()->model().objects.empty()) ||
Expand Down
3 changes: 1 addition & 2 deletions src/slic3r/GUI/GUI_ObjectList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ ObjectList::ObjectList(wxWindow* parent) :
entries[index++].Set(wxACCEL_CTRL, (int)'A', wxID_SELECTALL);
entries[index++].Set(wxACCEL_CTRL, (int)'Z', wxID_UNDO);
entries[index++].Set(wxACCEL_CTRL, (int)'Y', wxID_REDO);
entries[index++].Set(wxACCEL_NORMAL, WXK_DELETE, wxID_DELETE);
//entries[index++].Set(wxACCEL_NORMAL, WXK_BACK, wxID_DELETE);
entries[index++].Set(wxACCEL_NORMAL, WXK_BACK, wxID_DELETE);
//entries[index++].Set(wxACCEL_NORMAL, int('+'), wxID_ADD);
//entries[index++].Set(wxACCEL_NORMAL, WXK_NUMPAD_ADD, wxID_ADD);
//entries[index++].Set(wxACCEL_NORMAL, int('-'), wxID_REMOVE);
Expand Down

0 comments on commit 368badd

Please sign in to comment.