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)
|
void MenuFactory::append_menu_item_delete(wxMenu* menu)
|
||||||
{
|
{
|
||||||
#ifdef __WINDOWS__
|
#ifdef __APPLE__
|
||||||
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
|
|
||||||
append_menu_item(menu, wxID_ANY, _L("Delete") + "\tBackSpace", _L("Delete the selected object"),
|
append_menu_item(menu, wxID_ANY, _L("Delete") + "\tBackSpace", _L("Delete the selected object"),
|
||||||
[](wxCommandEvent&) { plater()->remove_selected(); }, "", nullptr,
|
[](wxCommandEvent&) { plater()->remove_selected(); }, "", nullptr,
|
||||||
[]() { return plater()->can_delete(); }, m_parent);
|
[]() { 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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,9 +207,9 @@ void KBShortcutsDialog::fill_shortcuts()
|
||||||
#endif
|
#endif
|
||||||
//DEL
|
//DEL
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
{"fn+⌫", L("Delete selected")},
|
{"BackSpace", L("Delete selected")},
|
||||||
#else
|
#else
|
||||||
{L("Del"), L("Delete selected")},
|
{"Delete", L("Delete selected")},
|
||||||
#endif
|
#endif
|
||||||
// Help
|
// Help
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
|
@ -274,7 +274,11 @@ void KBShortcutsDialog::fill_shortcuts()
|
||||||
|
|
||||||
Shortcuts object_list_shortcuts = {
|
Shortcuts object_list_shortcuts = {
|
||||||
{"1-9", L("Set extruder number for the objects and parts") },
|
{"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")},
|
{"Esc", L("Deselect all")},
|
||||||
{ctrl + "C", L("Copy to clipboard")},
|
{ctrl + "C", L("Copy to clipboard")},
|
||||||
{ctrl + "V", L("Paste from 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) {
|
for (int i = 0; i < items_count; ++i) {
|
||||||
const auto &[shortcut, description] = shortcuts.second[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->SetForegroundColour(wxColour(50, 58, 61));
|
||||||
key->SetFont(bold_font);
|
key->SetFont(bold_font);
|
||||||
grid_sizer->Add(key, 0, wxALIGN_CENTRE_VERTICAL);
|
grid_sizer->Add(key, 0, wxALIGN_CENTRE_VERTICAL);
|
||||||
|
|
Loading…
Reference in New Issue