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...@intel.com>
---
MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | 2 +-
MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 19 +++++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
index 01e114b..384acb9 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
@@ -2476,11 +2476,11 @@ GetQuestionValueFromForm (
ASSERT (Form != NULL);
//
// Get the question value.
//
- Status = GetQuestionValue(FormSet, Form, Question, GetSetValueWithHiiDriver);
+ Status = GetQuestionValue(FormSet, Form, Question,
GetSetValueWithEditBuffer);
if (EFI_ERROR (Status)) {
GetTheVal = FALSE;
goto Done;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index 251025b..b8c5a39 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -2065,10 +2065,15 @@ ProcessCallBackFunction (
// Do the question validation.
//
Status = ValueChangedValidation (gCurrentSelection->FormSet,
gCurrentSelection->Form, Statement);
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
// "retrieve" should update to the question's temp buffer.
//
SetQuestionValue(FormSet, Form, Statement,
GetSetValueWithEditBuffer);
}
@@ -2101,10 +2106,15 @@ ProcessCallBackFunction (
//
// Do the question validation.
//
InternalStatus = ValueChangedValidation (gCurrentSelection->FormSet,
gCurrentSelection->Form, Statement);
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);
}
}
//
@@ -2435,22 +2445,23 @@ SetupBrowser (
Selection->FormId = Selection->Form->FormId;
Selection->QuestionId = 0;
}
}
- //
- // Verify whether question value has checked, update the ValueChanged
flag in Question.
- //
- IsQuestionValueChanged(gCurrentSelection->FormSet,
gCurrentSelection->Form, Statement, GetSetValueWithBuffer);
if (!EFI_ERROR (Status) &&
(Statement->Operand != EFI_IFR_REF_OP) &&
((Statement->Storage == NULL) || (Statement->Storage != NULL &&
Statement->ValueChanged))) {
//
// Only question value has been changed, browser will trig CHANGED
callback.
//
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 {
//
// Do the question validation.
//
--
1.9.5.msysgit.1
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel