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@9197 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jchen20 2009-08-26 02:21:45 +00:00
parent e3eb7467c6
commit 747b19eadc
1 changed files with 4 additions and 4 deletions

View File

@ -2696,19 +2696,19 @@ UiDisplayMenu (
TopOfScreen = NewPos; TopOfScreen = NewPos;
} }
Difference = MoveToNextStatement (TRUE, &NewPos); Difference = MoveToNextStatement (TRUE, &NewPos);
PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos); PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos);
DistanceValue += PreviousMenuOption->Skip; DistanceValue += PreviousMenuOption->Skip;
if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) { if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) {
if (Difference > 0) { if (Difference > 0) {
// //
// Previous focus MenuOption is above the TopOfScreen, so we need to scroll // Previous focus MenuOption is above the TopOfScreen, so we need to scroll
// //
TopOfScreen = NewPos; TopOfScreen = NewPos;
Repaint = TRUE; Repaint = TRUE;
SkipValue = 0; SkipValue = 0;
OldSkipValue = 0; OldSkipValue = 0;
} }
} }
if (Difference < 0) { if (Difference < 0) {