\r
TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT;\r
BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT;\r
-\r
- if (gMisMatch) {\r
+ //\r
+ // When option mismatch happens,there exist two cases,one is reenter the form, just like the if case below,\r
+ // and the other is exit current form and enter last form, it can be covered by the else case.\r
+ //\r
+ if (gMisMatch && gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle && gFormData->FormId == gHighligthMenuInfo.FormId) {\r
//\r
// Reenter caused by option mismatch or auto exit caused by refresh form(refresh interval/guid), \r
// base on the record highlight info to find the highlight menu.\r
//\r
- ASSERT (gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle &&\r
- gFormData->FormId == gHighligthMenuInfo.FormId);\r
\r
*HighlightMenu = FindHighLightMenuOption(NULL);\r
if (*HighlightMenu != NULL) {\r
*SkipValue = 0;\r
}\r
\r
- gMisMatch = FALSE;\r
} else if (FormData->HighLightedStatement != NULL) {\r
if (IsSavedHighlightStatement (FormData->HighLightedStatement)) {\r
//\r
*SkipValue = 0;\r
}\r
\r
+ gMisMatch = FALSE;\r
+\r
//\r
// First enter to show the menu, update highlight info.\r
//\r