Refine the logic about processing options for oneof opcode.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14389 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2013-05-27 07:04:09 +00:00
parent 9cf37b4018
commit 61f1b7c51e
1 changed files with 24 additions and 6 deletions

View File

@ -1023,10 +1023,10 @@ GetSelectionInputPopUp (
for (Index = 0; Index < OptionCount; Index++) { for (Index = 0; Index < OptionCount; Index++) {
OneOfOption = QUESTION_OPTION_FROM_LINK (Link); OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
Link = GetNextNode (&Question->OptionListHead, Link); Link = GetNextNode (&Question->OptionListHead, Link);
if ((OneOfOption->SuppressExpression == NULL) || if ((OneOfOption->SuppressExpression != NULL) &&
EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) == ExpressFalse) { EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) > ExpressFalse) {
RemoveEntryList (&OneOfOption->Link); continue;
InsertHeadList (&Question->OptionListHead, &OneOfOption->Link); } else {
PopUpMenuLines++; PopUpMenuLines++;
} }
} }
@ -1040,6 +1040,13 @@ GetSelectionInputPopUp (
Link = GetFirstNode (&Question->OptionListHead); Link = GetFirstNode (&Question->OptionListHead);
for (Index = 0; Index < PopUpMenuLines; Index++) { for (Index = 0; Index < PopUpMenuLines; Index++) {
OneOfOption = QUESTION_OPTION_FROM_LINK (Link); OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
Link = GetNextNode (&Question->OptionListHead, Link);
if (!OrderedList && (OneOfOption->SuppressExpression != NULL) &&
EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) > ExpressFalse) {
Index--;
continue;
}
StringPtr = GetToken (OneOfOption->Text, MenuOption->Handle); StringPtr = GetToken (OneOfOption->Text, MenuOption->Handle);
if (StrLen (StringPtr) > PopUpWidth) { if (StrLen (StringPtr) > PopUpWidth) {
@ -1053,8 +1060,6 @@ GetSelectionInputPopUp (
// //
HighlightOptionIndex = Index; HighlightOptionIndex = Index;
} }
Link = GetNextNode (&Question->OptionListHead, Link);
} }
// //
@ -1123,6 +1128,13 @@ GetSelectionInputPopUp (
Link = GetFirstNode (&Question->OptionListHead); Link = GetFirstNode (&Question->OptionListHead);
for (Index = 0; Index < TopOptionIndex; Index++) { for (Index = 0; Index < TopOptionIndex; Index++) {
Link = GetNextNode (&Question->OptionListHead, Link); Link = GetNextNode (&Question->OptionListHead, Link);
OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
if (!OrderedList && (OneOfOption->SuppressExpression != NULL) &&
EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) > ExpressFalse) {
Index--;
continue;
}
} }
// //
@ -1133,6 +1145,12 @@ GetSelectionInputPopUp (
OneOfOption = QUESTION_OPTION_FROM_LINK (Link); OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
Link = GetNextNode (&Question->OptionListHead, Link); Link = GetNextNode (&Question->OptionListHead, Link);
if (!OrderedList && (OneOfOption->SuppressExpression != NULL) &&
EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) > ExpressFalse) {
Index--;
continue;
}
StringPtr = GetToken (OneOfOption->Text, MenuOption->Handle); StringPtr = GetToken (OneOfOption->Text, MenuOption->Handle);
ASSERT (StringPtr != NULL); ASSERT (StringPtr != NULL);
// //