mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 05:30:41 +08:00
Follow-up ba5e8b87 - Fixed working of the "Delete" button
SPE-2237
This commit is contained in:
parent
2c0f826d89
commit
cd76008e81
@ -96,8 +96,27 @@ wxMenuItem* append_menu_item(wxMenu* menu, int id, const wxString& string, const
|
||||
|
||||
#ifndef __APPLE__
|
||||
if (wxAcceleratorEntry* entry = wxAcceleratorEntry::Create(string)) {
|
||||
entry->SetMenuItem(item);
|
||||
accelerator_entries_cache().push_back(entry);
|
||||
|
||||
static const std::set<int> special_keys = {
|
||||
WXK_PAGEUP,
|
||||
WXK_PAGEDOWN,
|
||||
WXK_NUMPAD_PAGEDOWN,
|
||||
WXK_END,
|
||||
WXK_HOME,
|
||||
WXK_LEFT,
|
||||
WXK_UP,
|
||||
WXK_RIGHT,
|
||||
WXK_DOWN,
|
||||
WXK_INSERT,
|
||||
WXK_DELETE,
|
||||
};
|
||||
|
||||
// Check for special keys not included in the table
|
||||
// see wxMSWKeyboard::WXWORD WXToVK(int wxk, bool *isExtended)
|
||||
if (std::find(special_keys.begin(), special_keys.end(), entry->GetKeyCode()) == special_keys.end()) {
|
||||
entry->SetMenuItem(item);
|
||||
accelerator_entries_cache().push_back(entry);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user