On a failed REF_OP callback, all changed fields in the Selection should be restored.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19268
6f19259b-4bc3-4df7-8a09-
765794883524
Utility functions for UI presentation.\r
\r
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
Utility functions for UI presentation.\r
\r
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
mCurFakeQestId = 0;\r
\r
do {\r
mCurFakeQestId = 0;\r
\r
do {\r
+\r
+ //\r
+ // Reset Status to prevent the next break from returning incorrect error status.\r
+ //\r
+ Status = EFI_SUCCESS;\r
+\r
//\r
// IFR is updated, force to reparse the IFR binary\r
// This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and \r
//\r
// IFR is updated, force to reparse the IFR binary\r
// This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and \r
//\r
if (EFI_ERROR (Status)) {\r
//\r
//\r
if (EFI_ERROR (Status)) {\r
//\r
- // Cross reference will not be taken\r
+ // Cross reference will not be taken, restore all essential field\r
- Selection->FormId = Selection->Form->FormId;\r
+ Selection->Handle = mCurrentHiiHandle;\r
+ CopyMem (&Selection->FormSetGuid, &mCurrentFormSetGuid, sizeof (EFI_GUID));\r
+ Selection->FormId = mCurrentFormId;\r
Selection->QuestionId = 0;\r
Selection->QuestionId = 0;\r
+ Selection->Action = UI_ACTION_REFRESH_FORM;\r