Win32: fix invalid accelerator labels.

pull/216/head
whitequark 2017-03-11 16:23:57 +00:00
parent 7e2b1b1d8d
commit 60f85f5a39
1 changed files with 1 additions and 0 deletions

View File

@ -183,6 +183,7 @@ std::string SolveSpace::MakeAcceleratorLabel(int accel) {
if(accel & GraphicsWindow::SHIFT_MASK) {
label += "Shift+";
}
accel &= ~(GraphicsWindow::CTRL_MASK | GraphicsWindow::SHIFT_MASK);
if(accel >= GraphicsWindow::FUNCTION_KEY_BASE + 1 &&
accel <= GraphicsWindow::FUNCTION_KEY_BASE + 12) {
label += ssprintf("F%d", accel - GraphicsWindow::FUNCTION_KEY_BASE);