mirror of https://github.com/acidanthera/audk.git
Clean the help string and hot key info if an empty form is painting.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14815 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
107e3d7a37
commit
8924aecd47
|
@ -2165,10 +2165,6 @@ UiDisplayMenu (
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuOption = NULL;
|
MenuOption = NULL;
|
||||||
|
|
||||||
if (IsListEmpty (&gMenuOption)) {
|
|
||||||
ControlFlag = CfReadKey;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2188,6 +2184,14 @@ UiDisplayMenu (
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsListEmpty (&gMenuOption)) {
|
||||||
|
//
|
||||||
|
// No menu option, just update the hotkey filed.
|
||||||
|
//
|
||||||
|
RefreshKeyHelp(gFormData, NULL, FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (MenuOption != NULL && TopOfScreen == &MenuOption->Link) {
|
if (MenuOption != NULL && TopOfScreen == &MenuOption->Link) {
|
||||||
Temp = SkipValue;
|
Temp = SkipValue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2372,15 +2376,22 @@ UiDisplayMenu (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Repaint || NewLine) {
|
if (Repaint || NewLine) {
|
||||||
//
|
if (IsListEmpty (&gMenuOption)) {
|
||||||
// Don't print anything if it is a NULL help token
|
//
|
||||||
//
|
// Don't print anything if no mwnu option.
|
||||||
ASSERT(MenuOption != NULL);
|
//
|
||||||
HelpInfo = ((EFI_IFR_STATEMENT_HEADER *) ((CHAR8 *)MenuOption->ThisTag->OpCode + sizeof (EFI_IFR_OP_HEADER)))->Help;
|
|
||||||
if (HelpInfo == 0 || !IsSelectable (MenuOption)) {
|
|
||||||
StringPtr = GetToken (STRING_TOKEN (EMPTY_STRING), gHiiHandle);
|
StringPtr = GetToken (STRING_TOKEN (EMPTY_STRING), gHiiHandle);
|
||||||
} else {
|
} else {
|
||||||
StringPtr = GetToken (HelpInfo, gFormData->HiiHandle);
|
//
|
||||||
|
// Don't print anything if it is a NULL help token
|
||||||
|
//
|
||||||
|
ASSERT(MenuOption != NULL);
|
||||||
|
HelpInfo = ((EFI_IFR_STATEMENT_HEADER *) ((CHAR8 *)MenuOption->ThisTag->OpCode + sizeof (EFI_IFR_OP_HEADER)))->Help;
|
||||||
|
if (HelpInfo == 0 || !IsSelectable (MenuOption)) {
|
||||||
|
StringPtr = GetToken (STRING_TOKEN (EMPTY_STRING), gHiiHandle);
|
||||||
|
} else {
|
||||||
|
StringPtr = GetToken (HelpInfo, gFormData->HiiHandle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowCount = BottomRow - TopRow + 1;
|
RowCount = BottomRow - TopRow + 1;
|
||||||
|
@ -2706,9 +2717,9 @@ UiDisplayMenu (
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CfScreenOperation:
|
case CfScreenOperation:
|
||||||
if (ScreenOperation != UiReset) {
|
if ((ScreenOperation != UiReset) && (ScreenOperation != UiHotKey)) {
|
||||||
//
|
//
|
||||||
// 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 or UiHotKey
|
||||||
// ignore the selection and go back to reading keys.
|
// ignore the selection and go back to reading keys.
|
||||||
//
|
//
|
||||||
if (IsListEmpty (&gMenuOption)) {
|
if (IsListEmpty (&gMenuOption)) {
|
||||||
|
|
Loading…
Reference in New Issue