From edab2a056e26cddf877b83f1f0c7b8effe671952 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 12 Apr 2019 11:50:14 +0200 Subject: [PATCH] Added icons for Edit menu items: Delete selected, Delete all, Copy, Paste --- resources/icons/copy_menu.svg | 37 ++++++++++++++++++++++++ resources/icons/delete_all_menu.svg | 31 ++++++++++++++++++++ resources/icons/paste_menu.svg | 27 ++++++++++++++++++ resources/icons/remove_menu.svg | 44 +++++++++++++++++++++++++++++ src/slic3r/GUI/MainFrame.cpp | 8 +++--- 5 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 resources/icons/copy_menu.svg create mode 100644 resources/icons/delete_all_menu.svg create mode 100644 resources/icons/paste_menu.svg create mode 100644 resources/icons/remove_menu.svg diff --git a/resources/icons/copy_menu.svg b/resources/icons/copy_menu.svg new file mode 100644 index 000000000..0d1af6a0a --- /dev/null +++ b/resources/icons/copy_menu.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/delete_all_menu.svg b/resources/icons/delete_all_menu.svg new file mode 100644 index 000000000..5ee6d6ea6 --- /dev/null +++ b/resources/icons/delete_all_menu.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/paste_menu.svg b/resources/icons/paste_menu.svg new file mode 100644 index 000000000..74dbbf8ee --- /dev/null +++ b/resources/icons/paste_menu.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + diff --git a/resources/icons/remove_menu.svg b/resources/icons/remove_menu.svg new file mode 100644 index 000000000..a25ae965b --- /dev/null +++ b/resources/icons/remove_menu.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index d24d41a48..56c7ec0ed 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -375,16 +375,16 @@ void MainFrame::init_menubar() [this](wxCommandEvent&) { m_plater->select_all(); }, ""); editMenu->AppendSeparator(); wxMenuItem* item_delete_sel = append_menu_item(editMenu, wxID_ANY, _(L("&Delete selected")) + sep + hotkey_delete, _(L("Deletes the current selection")), - [this](wxCommandEvent&) { m_plater->remove_selected(); }, ""); + [this](wxCommandEvent&) { m_plater->remove_selected(); }, "remove_menu"); wxMenuItem* item_delete_all = append_menu_item(editMenu, wxID_ANY, _(L("Delete &all")) + sep + GUI::shortkey_ctrl_prefix() + sep_space + hotkey_delete, _(L("Deletes all objects")), - [this](wxCommandEvent&) { m_plater->reset(); }, ""); + [this](wxCommandEvent&) { m_plater->reset(); }, "delete_all_menu"); editMenu->AppendSeparator(); wxMenuItem* item_copy = append_menu_item(editMenu, wxID_ANY, _(L("&Copy")) + "\tCtrl+C", _(L("Copy selection to clipboard")), - [this](wxCommandEvent&) { m_plater->copy_selection_to_clipboard(); }, ""); + [this](wxCommandEvent&) { m_plater->copy_selection_to_clipboard(); }, "copy_menu"); wxMenuItem* item_paste = append_menu_item(editMenu, wxID_ANY, _(L("&Paste")) + "\tCtrl+V", _(L("Paste clipboard")), - [this](wxCommandEvent&) { m_plater->paste_from_clipboard(); }, ""); + [this](wxCommandEvent&) { m_plater->paste_from_clipboard(); }, "paste_menu"); Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_select()); }, item_select_all->GetId()); Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_delete()); }, item_delete_sel->GetId());