MdeModulePkg:fix browser not call EFI_BROWSER_ACTION_CHANGED

fix bellow bug:
change checkbox  from FALSE to TRUE.EFI_BROWSER_ACTION_CHANGED called
but when checkbox change back to FALSE,don't call EFI_BROWSER_ACTION_CHANGED

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17512 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Dandan Bi 2015-05-26 11:43:18 +00:00 committed by dandanbi
parent 1e9c722958
commit e6557276f0
2 changed files with 16 additions and 5 deletions

View File

@ -2481,7 +2481,7 @@ GetQuestionValueFromForm (
// //
// Get the question value. // Get the question value.
// //
Status = GetQuestionValue(FormSet, Form, Question, GetSetValueWithHiiDriver); Status = GetQuestionValue(FormSet, Form, Question, GetSetValueWithEditBuffer);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
GetTheVal = FALSE; GetTheVal = FALSE;
goto Done; goto Done;

View File

@ -2066,6 +2066,11 @@ ProcessCallBackFunction (
// //
Status = ValueChangedValidation (gCurrentSelection->FormSet, gCurrentSelection->Form, Statement); Status = ValueChangedValidation (gCurrentSelection->FormSet, gCurrentSelection->Form, Statement);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
//
//check whether the question value changed compared with edit buffer before updating edit buffer
// if changed, set the ValueChanged flag to TRUE,in order to trig the CHANGED callback function
//
IsQuestionValueChanged(gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, GetSetValueWithEditBuffer);
// //
// According the spec, return value from call back of "changing" and // According the spec, return value from call back of "changing" and
// "retrieve" should update to the question's temp buffer. // "retrieve" should update to the question's temp buffer.
@ -2103,6 +2108,11 @@ ProcessCallBackFunction (
// //
InternalStatus = ValueChangedValidation (gCurrentSelection->FormSet, gCurrentSelection->Form, Statement); InternalStatus = ValueChangedValidation (gCurrentSelection->FormSet, gCurrentSelection->Form, Statement);
if (!EFI_ERROR (InternalStatus)) { if (!EFI_ERROR (InternalStatus)) {
//
//check whether the question value changed compared with edit buffer before updating edit buffer
// if changed, set the ValueChanged flag to TRUE,in order to trig the CHANGED callback function
//
IsQuestionValueChanged(gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, GetSetValueWithEditBuffer);
SetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer); SetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer);
} }
} }
@ -2437,10 +2447,6 @@ SetupBrowser (
} }
} }
//
// Verify whether question value has checked, update the ValueChanged flag in Question.
//
IsQuestionValueChanged(gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, GetSetValueWithBuffer);
if (!EFI_ERROR (Status) && if (!EFI_ERROR (Status) &&
(Statement->Operand != EFI_IFR_REF_OP) && (Statement->Operand != EFI_IFR_REF_OP) &&
@ -2449,6 +2455,11 @@ SetupBrowser (
// Only question value has been changed, browser will trig CHANGED callback. // Only question value has been changed, browser will trig CHANGED callback.
// //
ProcessCallBackFunction(Selection, Selection->FormSet, Selection->Form, Statement, EFI_BROWSER_ACTION_CHANGED, FALSE); ProcessCallBackFunction(Selection, Selection->FormSet, Selection->Form, Statement, EFI_BROWSER_ACTION_CHANGED, FALSE);
//
//check whether the question value changed compared with buffer value
//if doesn't change ,set the ValueChanged flag to FALSE ,in order not to display the "configuration changed "information on the screen
//
IsQuestionValueChanged(gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, GetSetValueWithBuffer);
} }
} else { } else {
// //