FORM_BROWSER_STATEMENT *Question;\r
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r
EFI_BROWSER_ACTION_REQUEST ActionRequest;\r
- CHAR16 *PadString;\r
\r
if (gMenuRefreshHead != NULL) {\r
\r
mHiiPackageListUpdated = FALSE;\r
\r
do {\r
- gST->ConOut->SetAttribute (gST->ConOut, MenuRefreshEntry->CurrentAttribute);\r
-\r
Selection = MenuRefreshEntry->Selection;\r
Question = MenuRefreshEntry->MenuOption->ThisTag;\r
\r
for (Index = 0; OptionString[Index] == L' '; Index++)\r
;\r
\r
- PadString = AllocatePool (gOptionBlockWidth * sizeof (CHAR16));\r
- SetMem16 (PadString, (gOptionBlockWidth - 1) * sizeof (CHAR16), CHAR_SPACE);\r
- PadString[gOptionBlockWidth - 1] = 0;\r
- PrintStringAt (MenuRefreshEntry->CurrentColumn, MenuRefreshEntry->CurrentRow, PadString);\r
- FreePool (PadString);\r
+ //\r
+ // If old Text is longer than new string, need to clean the old string before paint the newer.\r
+ // This option is no need for time/date opcode, because time/data opcode has fixed string length.\r
+ //\r
+ if ((MenuRefreshEntry->MenuOption->ThisTag->Operand != EFI_IFR_DATE_OP) &&\r
+ (MenuRefreshEntry->MenuOption->ThisTag->Operand != EFI_IFR_TIME_OP)) {\r
+ ClearLines (\r
+ MenuRefreshEntry->CurrentColumn, \r
+ MenuRefreshEntry->CurrentColumn + gOptionBlockWidth - 1,\r
+ MenuRefreshEntry->CurrentRow,\r
+ MenuRefreshEntry->CurrentRow,\r
+ PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND\r
+ );\r
+ }\r
+\r
+ gST->ConOut->SetAttribute (gST->ConOut, MenuRefreshEntry->CurrentAttribute);\r
PrintStringAt (MenuRefreshEntry->CurrentColumn, MenuRefreshEntry->CurrentRow, &OptionString[Index]);\r
FreePool (OptionString);\r
}\r