summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-26 02:19:29 +0000
committerjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-26 02:19:29 +0000
commite3eb7467c6f7af80c6f6b47b4ea030552e07821b (patch)
tree07d2977b8adfdeb7a5dfa2661d3b3c2bc1a10e18 /MdeModulePkg
parent6156fca14dcbab904c105d1d2972a4eed2f5288e (diff)
downloadedk2-e3eb7467c6f7af80c6f6b47b4ea030552e07821b.tar.gz
edk2-e3eb7467c6f7af80c6f6b47b4ea030552e07821b.tar.bz2
edk2-e3eb7467c6f7af80c6f6b47b4ea030552e07821b.zip
Fixed a bug on the menu display: Following steps to reproduce it:
1. Boot to shell 2. go to boot maint manager 3. Boot options 4. Add boot option 5. Add 15 or so unique boot options (just so the list scrolls) 6. go the boot maint manager 7. go to Boot options 8. go to Change boot order 9. the list is long enough that it scrolls when you push down once (to get to the commit option) 10. push down once and then up once (repeat) (from list selected to "commit" selected) 11. you will notice the list and text is getting corrupt 12. do it until all items in list are gone (system will assert) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9196 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Ui.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
index 264bee6465..8b7344f42a 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
@@ -2696,14 +2696,19 @@ UiDisplayMenu (
TopOfScreen = NewPos;
}
- Difference = MoveToNextStatement (TRUE, &NewPos);
- if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) {
+ Difference = MoveToNextStatement (TRUE, &NewPos);
+ PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ DistanceValue += PreviousMenuOption->Skip;
+
+ if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) {
if (Difference > 0) {
//
// Previous focus MenuOption is above the TopOfScreen, so we need to scroll
//
TopOfScreen = NewPos;
Repaint = TRUE;
+ SkipValue = 0;
+ OldSkipValue = 0;
}
}
if (Difference < 0) {