mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 15:14:02 +02:00
Disable change value for grayout or readonly menu.
Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12817 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
9386c41d1a
commit
febca2e364
@ -2876,6 +2876,11 @@ UiDisplayMenu (
|
|||||||
|
|
||||||
switch (Key.UnicodeChar) {
|
switch (Key.UnicodeChar) {
|
||||||
case CHAR_CARRIAGE_RETURN:
|
case CHAR_CARRIAGE_RETURN:
|
||||||
|
if(MenuOption->GrayOut || MenuOption->ReadOnly) {
|
||||||
|
ControlFlag = CfReadKey;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ScreenOperation = UiSelect;
|
ScreenOperation = UiSelect;
|
||||||
gDirection = 0;
|
gDirection = 0;
|
||||||
break;
|
break;
|
||||||
@ -2890,7 +2895,7 @@ UiDisplayMenu (
|
|||||||
// If the screen has no menu items, and the user didn't select UiReset
|
// If the screen has no menu items, and the user didn't select UiReset
|
||||||
// ignore the selection and go back to reading keys.
|
// ignore the selection and go back to reading keys.
|
||||||
//
|
//
|
||||||
if(IsListEmpty (&gMenuOption)) {
|
if(IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) {
|
||||||
ControlFlag = CfReadKey;
|
ControlFlag = CfReadKey;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2943,7 +2948,7 @@ UiDisplayMenu (
|
|||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(MenuOption != NULL);
|
ASSERT(MenuOption != NULL);
|
||||||
if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut) {
|
if (MenuOption->ThisTag->Operand == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut && !MenuOption->ReadOnly) {
|
||||||
ScreenOperation = UiSelect;
|
ScreenOperation = UiSelect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user