- if ((SavedMenuOption->ThisTag->OpCode->OpCode == EFI_IFR_DATE_OP || SavedMenuOption->ThisTag->OpCode->OpCode == EFI_IFR_TIME_OP) &&\r
- (gHighligthMenuInfo.QuestionId != 0) && \r
- (gHighligthMenuInfo.QuestionId == GetQuestionIdInfo(SavedMenuOption->ThisTag->OpCode))) {\r
- //\r
- // Still show the highlight menu before exit from display engine.\r
- //\r
- BottomRow = gHighligthMenuInfo.DisplayRow + SavedMenuOption->Skip;\r
+ // HiiHandle + QuestionId can find the only one question in the system.\r
+ //\r
+ // If this question has question id, save the question id info to find the question.\r
+ // else save the opcode buffer to find it.\r
+ //\r
+ if (gFormData->FormRefreshEvent != NULL && gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle) {\r
+ if (gHighligthMenuInfo.QuestionId != 0) { \r
+ if (gHighligthMenuInfo.QuestionId == GetQuestionIdInfo(SavedMenuOption->ThisTag->OpCode)) {\r
+ BottomRow = gHighligthMenuInfo.DisplayRow + SavedMenuOption->Skip;\r
+ //\r
+ // SkipValue only used for menu at the top of the form.\r
+ // If Highlight menu is not at the top, this value will be update later.\r
+ //\r
+ TmpValue = gHighligthMenuInfo.SkipValue;\r
+ }\r
+ } else if (gHighligthMenuInfo.OpCode != NULL){\r
+ if (!CompareMem (gHighligthMenuInfo.OpCode, SavedMenuOption->ThisTag->OpCode, gHighligthMenuInfo.OpCode->Length)) {\r
+ BottomRow = gHighligthMenuInfo.DisplayRow + SavedMenuOption->Skip;\r
+ //\r
+ // SkipValue only used for menu at the top of the form.\r
+ // If Highlight menu is not at the top, this value will be update later.\r
+ //\r
+ TmpValue = gHighligthMenuInfo.SkipValue;\r
+ }\r
+ }\r