From c792e5b8a3fb103c1e06663f44fa9bda801fc31b Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Fri, 9 Jan 2015 02:38:39 +0000 Subject: [PATCH] Restore question value for question without storage after CHANGING callback return error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16592 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/SetupBrowserDxe/Presentation.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index ad39d22a9d..8fd1c088bc 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1,7 +1,7 @@ /** @file Utility functions for UI presentation. -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -2048,8 +2048,15 @@ ProcessCallBackFunction ( // According the spec, return fail from call back of "changing" and // "retrieve", should restore the question's value. // - if ((Action == EFI_BROWSER_ACTION_CHANGING && Status != EFI_UNSUPPORTED) || - Action == EFI_BROWSER_ACTION_RETRIEVE) { + if (Action == EFI_BROWSER_ACTION_CHANGING && Status != EFI_UNSUPPORTED) { + if (Statement->Storage != NULL) { + GetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer); + } else if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) { + ProcessCallBackFunction (Selection, FormSet, Form, Question, EFI_BROWSER_ACTION_RETRIEVE, FALSE); + } + } + + if (Action == EFI_BROWSER_ACTION_RETRIEVE) { GetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer); } -- 2.39.2