diff options
author | Eric Dong <eric.dong@intel.com> | 2013-10-29 11:22:39 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-10-29 11:22:39 +0000 |
commit | 8924aecd470f84968369982a69aa30acc7c387df (patch) | |
tree | d254d913c547b91eacb05c6d61483c7f61eee500 | |
parent | 107e3d7a37035ec386941ad8fafcd9e7d4b0fabe (diff) | |
download | edk2-platforms-8924aecd470f84968369982a69aa30acc7c387df.tar.xz |
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
-rw-r--r-- | MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 9f6c963153..fffc67d695 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -2165,10 +2165,6 @@ UiDisplayMenu ( }
MenuOption = NULL;
-
- if (IsListEmpty (&gMenuOption)) {
- ControlFlag = CfReadKey;
- }
}
break;
@@ -2188,6 +2184,14 @@ UiDisplayMenu ( break;
}
+ if (IsListEmpty (&gMenuOption)) {
+ //
+ // No menu option, just update the hotkey filed.
+ //
+ RefreshKeyHelp(gFormData, NULL, FALSE);
+ break;
+ }
+
if (MenuOption != NULL && TopOfScreen == &MenuOption->Link) {
Temp = SkipValue;
} else {
@@ -2372,15 +2376,22 @@ UiDisplayMenu ( }
if (Repaint || NewLine) {
- //
- // 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)) {
+ if (IsListEmpty (&gMenuOption)) {
+ //
+ // Don't print anything if no mwnu option.
+ //
StringPtr = GetToken (STRING_TOKEN (EMPTY_STRING), gHiiHandle);
} 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;
@@ -2706,9 +2717,9 @@ UiDisplayMenu ( break;
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.
//
if (IsListEmpty (&gMenuOption)) {
|