Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Add Models" to plate and background context menu #5319

Merged
merged 3 commits into from May 18, 2024

Conversation

yw4z
Copy link
Contributor

@yw4z yw4z commented May 10, 2024

Adds "Add Model" item for plate and background context menus

• One of the most used functions like arrange, split or etc. they are already exist on toolbar and context menu
• Knowing add / import function on context menu is useful and adds a alternative way to import model
• you don't have to move mouse to toolbar. reduces mouse movements
• I'm sure many people will found useful. especially people that came from cura. I'm still searching this item on context menu
• I added menu item to end of menu to keep same order otherwise old users will click to "add model" every time instead "add primitive"
• "Add models" already exist in translations. Does not require additional translations

Screenshot-20240515034827
Screenshot-20240515034812

Code can be shorter if it was used like this

#ifdef __WINDOWS__
    auto add_icon = "menu_add_part"
#else
    auto add_icon = ""
#endif
append_submenu(menu, sub_menu_primitives, wxID_ANY, _L("Add Primitive"), "", add_icon,
    []() {return true; }, m_parent);
append_submenu(menu, sub_menu_handy, wxID_ANY, _L("Add Handy models"), "", add_icon,
    []() {return true; }, m_parent);
// ORCA: Add Model
append_menu_item(menu, wxID_ANY, _L("Add Model"), "",
    [](wxCommandEvent&) { plater()->add_file(); }, add_icon, menu,
    []() {  return wxGetApp().plater()->can_add_model(); }, m_parent);

@yw4z yw4z changed the title Add "Add Model" on plate and background context menu Add "Add Model" menu item for plate and background context menu May 10, 2024
@yw4z yw4z changed the title Add "Add Model" menu item for plate and background context menu Add "Add Models" to plate and background context menu May 15, 2024
Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one.
Thanks!

@SoftFever SoftFever merged commit 4bcc109 into SoftFever:main May 18, 2024
12 checks passed
@yw4z yw4z deleted the context-menu-add-model branch May 18, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants