diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index b8612e8c42..62811c751a 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1436,6 +1436,15 @@ SetupBrowser ( InsertTailList (&gBrowserFormSetList, &gOldFormSet->Link); do { + // + // IFR is updated, force to reparse the IFR binary + // + if (mHiiPackageListUpdated) { + Selection->Action = UI_ACTION_REFRESH_FORMSET; + mHiiPackageListUpdated = FALSE; + break; + } + // // Initialize Selection->Form // @@ -1476,11 +1485,6 @@ SetupBrowser ( } } - // - // Reset FormPackage update flag - // - mHiiPackageListUpdated = FALSE; - // // Before display new form, invoke ConfigAccess.Callback() with EFI_BROWSER_ACTION_FORM_OPEN // for each question with callback flag. @@ -1564,11 +1568,6 @@ SetupBrowser ( gResetRequired = TRUE; } - // - // Reset FormPackage update flag - // - mHiiPackageListUpdated = FALSE; - if ((ConfigAccess != NULL) && ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) && (Statement->Operand != EFI_IFR_PASSWORD_OP)) { @@ -1597,17 +1596,6 @@ SetupBrowser ( ProcessCallBackFunction(Selection, Statement, EFI_BROWSER_ACTION_CHANGED, FALSE); } } - - // - // Check whether Form Package has been updated during Callback - // - if (mHiiPackageListUpdated && (Selection->Action == UI_ACTION_REFRESH_FORM)) { - // - // Force to reparse IFR binary of target Formset - // - mHiiPackageListUpdated = FALSE; - Selection->Action = UI_ACTION_REFRESH_FORMSET; - } } //