Revision: 17512
          http://sourceforge.net/p/edk2/code/17512
Author:   dandanbi
Date:     2015-05-26 11:43:18 +0000 (Tue, 26 May 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Eric Dong <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
    trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c

Modified: trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c      
2015-05-26 11:36:52 UTC (rev 17511)
+++ trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c      
2015-05-26 11:43:18 UTC (rev 17512)
@@ -2481,7 +2481,7 @@
   //
   // Get the question value.
   //
-  Status = GetQuestionValue(FormSet, Form, Question, GetSetValueWithHiiDriver);
+  Status = GetQuestionValue(FormSet, Form, Question, 
GetSetValueWithEditBuffer);
   if (EFI_ERROR (Status)) {
     GetTheVal = FALSE;
     goto Done;

Modified: trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c    
2015-05-26 11:36:52 UTC (rev 17511)
+++ trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c    
2015-05-26 11:43:18 UTC (rev 17512)
@@ -2067,6 +2067,11 @@
         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.
           //
@@ -2103,6 +2108,11 @@
         //
         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);
         }
       }
@@ -2437,10 +2447,6 @@
           }
         }
 
-        //
-        // 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) && 
@@ -2449,6 +2455,11 @@
           // 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 {
         //


------------------------------------------------------------------------------
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-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to