feat: add registerAccelerator flag to allow menu items to optionally skip accelerator registration (#15723)
* feat: add registerAccelerator flag to allow menu items to skip registration * docs: add docs for registerAccelerator * docs: re-add accidentally removed line
This commit is contained in:
parent
3748ee49ea
commit
0242818f39
9 changed files with 43 additions and 7 deletions
|
@ -77,9 +77,11 @@ void GenerateAcceleratorTable(AcceleratorTable* table,
|
|||
GenerateAcceleratorTable(table, submodel);
|
||||
} else {
|
||||
ui::Accelerator accelerator;
|
||||
if (model->GetAcceleratorAtWithParams(i, true, &accelerator)) {
|
||||
MenuItem item = {i, model};
|
||||
(*table)[accelerator] = item;
|
||||
if (model->ShouldRegisterAcceleratorAt(i)) {
|
||||
if (model->GetAcceleratorAtWithParams(i, true, &accelerator)) {
|
||||
MenuItem item = {i, model};
|
||||
(*table)[accelerator] = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue