diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-11-22 10:39:38 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-11-23 10:11:47 +0800 |
commit | 0265811dbe56cf46fb3c152b2ccdefd8fb47a170 (patch) | |
tree | 6dcf7263e2310a992c85d5d202854302f8b04123 /MdeModulePkg | |
parent | b857bf48133933a72f6edcd9bac3214799e093de (diff) | |
download | edk2-0265811dbe56cf46fb3c152b2ccdefd8fb47a170.tar.gz edk2-0265811dbe56cf46fb3c152b2ccdefd8fb47a170.tar.bz2 edk2-0265811dbe56cf46fb3c152b2ccdefd8fb47a170.zip |
MdeModulePkg/DisplayEngine: Return the selectable menu correctly
When returning selectable menu, should return the menu in current form,
the codes miss to do the check. Now returning the selectable menu behind
the codes "if ((UINTN) Distance + NextMenuOption->Skip > GapToTop)".
Then can cover the check, can return the menu correctly.
https://bugzilla.tianocore.org/show_bug.cgi?id=232
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index c2cffecbe9..316e2e3705 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -1050,12 +1050,8 @@ MoveToNextStatement ( UpdateOptionSkipLines (NextMenuOption);
}
- if (IsSelectable (NextMenuOption)) {
- break;
- }
-
//
- // In this case, still can't find the selectable menu,
+ // Check whether the menu is beyond current showing form,
// return the first one beyond the showing form.
//
if ((UINTN) Distance + NextMenuOption->Skip > GapToTop) {
@@ -1065,6 +1061,13 @@ MoveToNextStatement ( break;
}
+ //
+ // return the selectable menu in the showing form.
+ //
+ if (IsSelectable (NextMenuOption)) {
+ break;
+ }
+
Distance += NextMenuOption->Skip;
//
|