Skip to content

Commit

Permalink
Add "Add Models" to plate and background context menu (#5319)
Browse files Browse the repository at this point in the history
* Add "Add Model" on plate and background context menu

* Fix icon usage if its not windows os

* Update item name with an existed translation "Add models"
  • Loading branch information
yw4z authored May 18, 2024
1 parent cc2eb36 commit 4bcc109
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/slic3r/GUI/GUI_Factories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,11 +1241,17 @@ void MenuFactory::create_default_menu()
[]() {return true; }, m_parent);
append_submenu(&m_default_menu, sub_menu_handy, wxID_ANY, _L("Add Handy models"), "", "menu_add_part",
[]() {return true; }, m_parent);
append_menu_item(&m_default_menu, wxID_ANY, _L("Add Models"), "", // ORCA: Add Models
[](wxCommandEvent&) { plater()->add_file(); }, "menu_add_part", &m_default_menu,
[]() {return wxGetApp().plater()->can_add_model(); }, m_parent);
#else
append_submenu(&m_default_menu, sub_menu_primitives, wxID_ANY, _L("Add Primitive"), "", "",
[]() {return true; }, m_parent);
append_submenu(&m_default_menu, sub_menu_handy, wxID_ANY, _L("Add Handy models"), "", "",
[]() {return true; }, m_parent);
append_menu_item(&m_default_menu, wxID_ANY, _L("Add Models"), "", // ORCA: Add Models
[](wxCommandEvent&) { plater()->add_file(); }, "", &m_default_menu,
[]() {return wxGetApp().plater()->can_add_model(); }, m_parent);
#endif

m_default_menu.AppendSeparator();
Expand Down Expand Up @@ -1547,11 +1553,17 @@ void MenuFactory::create_plate_menu()
[]() {return true; }, m_parent);
append_submenu(menu, sub_menu_handy, wxID_ANY, _L("Add Handy models"), "", "menu_add_part",
[]() {return true; }, m_parent);
append_menu_item(menu, wxID_ANY, _L("Add Models"), "", // ORCA: Add Models
[](wxCommandEvent&) { plater()->add_file(); }, "menu_add_part", menu,
[]() {return wxGetApp().plater()->can_add_model(); }, m_parent);
#else
append_submenu(menu, sub_menu_primitives, wxID_ANY, _L("Add Primitive"), "", "",
[]() {return true; }, m_parent);
append_submenu(menu, sub_menu_handy, wxID_ANY, _L("Add Handy models"), "", "",
[]() {return true; }, m_parent);
append_menu_item(menu, wxID_ANY, _L("Add Models"), "", // ORCA: Add Models
[](wxCommandEvent&) { plater()->add_file(); }, "", menu,
[]() {return wxGetApp().plater()->can_add_model(); }, m_parent);
#endif


Expand Down

0 comments on commit 4bcc109

Please sign in to comment.