]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fixed a bug on the menu display: Following steps to reproduce it:
authorjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Aug 2009 02:19:29 +0000 (02:19 +0000)
committerjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Aug 2009 02:19:29 +0000 (02:19 +0000)
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

MdeModulePkg/Universal/SetupBrowserDxe/Ui.c

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