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++) {
OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
Link = GetNextNode (&Question->OptionListHead, Link);
if ((OneOfOption->SuppressExpression == NULL) ||
EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) == ExpressFalse) {
RemoveEntryList (&OneOfOption->Link);
InsertHeadList (&Question->OptionListHead, &OneOfOption->Link);
if ((OneOfOption->SuppressExpression != NULL) &&
EvaluateExpressionList(OneOfOption->SuppressExpression, FALSE, NULL, NULL) > ExpressFalse) {
continue;
} else {
PopUpMenuLines++;
}
}
@ -1040,6 +1040,13 @@ GetSelectionInputPopUp (
Link = GetFirstNode (&Question->OptionListHead);
for (Index = 0; Index < PopUpMenuLines; Index++) {
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);
if (StrLen (StringPtr) > PopUpWidth) {
@ -1053,8 +1060,6 @@ GetSelectionInputPopUp (
//
HighlightOptionIndex = Index;
}
Link = GetNextNode (&Question->OptionListHead, Link);
}
//
@ -1123,6 +1128,13 @@ GetSelectionInputPopUp (
Link = GetFirstNode (&Question->OptionListHead);
for (Index = 0; Index < TopOptionIndex; Index++) {
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);
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);
ASSERT (StringPtr != NULL);
//