]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg:fix browser not call EFI_BROWSER_ACTION_CHANGED
authorDandan Bi <dandan.bi@intel.com>
Tue, 26 May 2015 11:43:18 +0000 (11:43 +0000)
committerdandanbi <dandanbi@Edk2>
Tue, 26 May 2015 11:43:18 +0000 (11:43 +0000)
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

MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c

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