ENH:modify "delete" in KBShortcutsDialog
jira: none Change-Id: I9736273a210bc2f0ac49607a4539613cee0f19b5
This commit is contained in:
parent
f3c7411351
commit
6b1a824541
|
@ -476,14 +476,13 @@ void MenuFactory::append_menu_item_set_visible(wxMenu* menu)
|
|||
|
||||
void MenuFactory::append_menu_item_delete(wxMenu* menu)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
append_menu_item(menu, wxID_ANY, _L("Delete") + "\tDelete", _L("Delete the selected object"),
|
||||
[](wxCommandEvent&) { plater()->remove_selected(); }, "menu_delete", nullptr,
|
||||
[]() { return plater()->can_delete(); }, m_parent);
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
append_menu_item(menu, wxID_ANY, _L("Delete") + "\tBackSpace", _L("Delete the selected object"),
|
||||
[](wxCommandEvent&) { plater()->remove_selected(); }, "", nullptr,
|
||||
[]() { return plater()->can_delete(); }, m_parent);
|
||||
#else
|
||||
append_menu_item(menu, wxID_ANY, _L("Delete") + "\tDelete", _L("Delete the selected object"), [](wxCommandEvent &) { plater()->remove_selected(); }, "menu_delete", nullptr,
|
||||
[]() { return plater()->can_delete(); }, m_parent);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -207,9 +207,9 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
#endif
|
||||
//DEL
|
||||
#ifdef __APPLE__
|
||||
{"fn+⌫", L("Delete selected")},
|
||||
{"BackSpace", L("Delete selected")},
|
||||
#else
|
||||
{L("Del"), L("Delete selected")},
|
||||
{"Delete", L("Delete selected")},
|
||||
#endif
|
||||
// Help
|
||||
#ifdef __WINDOWS__
|
||||
|
@ -274,7 +274,11 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
|
||||
Shortcuts object_list_shortcuts = {
|
||||
{"1-9", L("Set extruder number for the objects and parts") },
|
||||
{L("Del"), L("Delete objects, parts, modifiers ")},
|
||||
#ifdef __APPLE__
|
||||
{"BackSpace", L("Delete objects, parts, modifiers ")},
|
||||
#else
|
||||
{"Delete", L("Delete objects, parts, modifiers ")},
|
||||
#endif
|
||||
{"Esc", L("Deselect all")},
|
||||
{ctrl + "C", L("Copy to clipboard")},
|
||||
{ctrl + "V", L("Paste from clipboard")},
|
||||
|
@ -330,7 +334,13 @@ wxPanel* KBShortcutsDialog::create_page(wxWindow* parent, const ShortcutsItem& s
|
|||
|
||||
for (int i = 0; i < items_count; ++i) {
|
||||
const auto &[shortcut, description] = shortcuts.second[i];
|
||||
auto key = new wxStaticText(scrollable_panel, wxID_ANY, _(shortcut));
|
||||
wxStaticText* key = nullptr;
|
||||
if (shortcut == "Delete" || shortcut == "BackSpace") {
|
||||
key = new wxStaticText(scrollable_panel, wxID_ANY, shortcut);
|
||||
}
|
||||
else {
|
||||
key = new wxStaticText(scrollable_panel, wxID_ANY, _(shortcut));
|
||||
}
|
||||
key->SetForegroundColour(wxColour(50, 58, 61));
|
||||
key->SetFont(bold_font);
|
||||
grid_sizer->Add(key, 0, wxALIGN_CENTRE_VERTICAL);
|
||||
|
|
Loading…
Reference in New Issue