diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-31 03:33:55 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-31 03:33:55 +0000 |
commit | b2e444aaf7adcf97a52303f6785336ea19312729 (patch) | |
tree | f1175f218d68bbd479f1578836b2836f170e4952 /MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | |
parent | 50bdaa059217764a053da2fd234f04bef39db826 (diff) | |
download | edk2-platforms-b2e444aaf7adcf97a52303f6785336ea19312729.tar.xz |
When browser was requested to go to another formset, it also needs to update the hiihandle in Selection structure. If not update this handle, later when call function GetIfrBinaryData to get binary ifr data will return failed.
Also add sample code to use it.
Signed-off-by: ydong10
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12607 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 62ce070462..b58a00a544 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1006,14 +1006,32 @@ FindNextMenu ( CHAR16 NoResponse;
EFI_INPUT_KEY Key;
EFI_STATUS Status;
+ BROWSER_SETTING_SCOPE Scope;
CurrentMenu = Selection->CurrentMenu;
if (CurrentMenu != NULL && CurrentMenu->Parent != NULL) {
//
+ // we have a parent, so go to the parent menu
+ //
+ if (CompareGuid (&CurrentMenu->FormSetGuid, &CurrentMenu->Parent->FormSetGuid)) {
+ //
+ // The parent menu and current menu are in the same formset
+ //
+ Selection->Action = UI_ACTION_REFRESH_FORM;
+ Scope = FormLevel;
+ } else {
+ Selection->Action = UI_ACTION_REFRESH_FORMSET;
+ CopyMem (&Selection->FormSetGuid, &CurrentMenu->Parent->FormSetGuid, sizeof (EFI_GUID));
+ Selection->Handle = CurrentMenu->Parent->HiiHandle;
+ Scope = FormSetLevel;
+ }
+
+ //
// Form Level Check whether the data is changed.
//
- if (gBrowserSettingScope == FormLevel && Selection->Form->NvUpdateRequired) {
+ if ((gBrowserSettingScope == FormLevel && Selection->Form->NvUpdateRequired) ||
+ (gBrowserSettingScope == FormSetLevel && IsNvUpdateRequired(Selection->FormSet) && Scope == FormSetLevel)) {
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
YesResponse = gYesResponse[0];
@@ -1050,26 +1068,15 @@ FindNextMenu ( //
// If the user hits the YesResponse key
//
- Status = SubmitForm (Selection->FormSet, Selection->Form, FormLevel);
+ Status = SubmitForm (Selection->FormSet, Selection->Form, Scope);
} else {
//
// If the user hits the NoResponse key
//
- Status = DiscardForm (Selection->FormSet, Selection->Form, FormLevel);
+ Status = DiscardForm (Selection->FormSet, Selection->Form, Scope);
}
}
- //
- // we have a parent, so go to the parent menu
- //
- if (CompareGuid (&CurrentMenu->FormSetGuid, &CurrentMenu->Parent->FormSetGuid)) {
- //
- // The parent menu and current menu are in the same formset
- //
- Selection->Action = UI_ACTION_REFRESH_FORM;
- } else {
- Selection->Action = UI_ACTION_REFRESH_FORMSET;
- }
Selection->Statement = NULL;
Selection->FormId = CurrentMenu->Parent->FormId;
|