Reviewed-by: Eric Dong <eric.d...@intel.com>

From: Bi, Dandan
Sent: Wednesday, May 20, 2015 5:46 PM
To: edk2-devel@lists.sourceforge.net; Gao, Liming; Dong, Eric
Subject: MdeModulePkg:fix more than one arrow shows for one goto menu

Fix the bug : if one goto menu has more than one rows, more than one arrow will 
show up in the form.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan...@intel.com<mailto:dandan...@intel.com>>
---
MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c 
b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index 945c704..df39e9f 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -2294,10 +2294,11 @@ DisplayOneMenu (
   UINTN                           Temp;
   UINTN                           Temp2;
   UINTN                           Temp3;
   EFI_STATUS                      Status;
   UINTN                           Row;
+  BOOLEAN                         IsProcessingFirstRow;
   UINTN                           Col;
   UINTN                           PromptLineNum;
   UINTN                           OptionLineNum;
   CHAR16                          AdjustValue;
   UINTN                           MaxRow;
@@ -2308,10 +2309,11 @@ DisplayOneMenu (
   Temp3     = SkipLine;
   AdjustValue   = 0;
   PromptLineNum = 0;
   OptionLineNum = 0;
   MaxRow        = 0;
+  IsProcessingFirstRow = TRUE;

   //
   // Set default color.
   //
   SetDisplayAttribute (MenuOption, FALSE);
@@ -2411,19 +2413,20 @@ DisplayOneMenu (
         //
         // 1.Clean the start LEFT_SKIPPED_COLUMNS
         //
         PrintStringAtWithWidth (BeginCol, Row, L"", SkipWidth);

-        if (Statement->OpCode->OpCode == EFI_IFR_REF_OP && MenuOption->Col >= 
2) {
+        if (Statement->OpCode->OpCode == EFI_IFR_REF_OP && MenuOption->Col >= 
2 && IsProcessingFirstRow) {
           //
           // Print Arrow for Goto button.
           //
           PrintCharAt (
             MenuOption->Col - 2,
             Row,
             GEOMETRICSHAPE_RIGHT_TRIANGLE
             );
+          IsProcessingFirstRow = FALSE;
         }
         DisplayMenuString (MenuOption, MenuOption->Col, Row, OutputString, 
PromptWidth + AdjustValue, Highlight);
         PromptLineNum ++;
       }
       //
--
1.9.5.msysgit.1
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to