diff options
author | Liming Gao <liming.gao@intel.com> | 2016-08-18 19:51:21 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-08-23 14:07:19 +0800 |
commit | 93e59f76fe502100a66e971acfbc1c58c63f564d (patch) | |
tree | b5c212fc2b0c0d0a0c05ecf96159545a0b2f90e6 /MdeModulePkg/Universal/SetupBrowserDxe | |
parent | 5c66efd0ed8c994a13228096bf2e281c0b980b8d (diff) | |
download | edk2-93e59f76fe502100a66e971acfbc1c58c63f564d.tar.gz edk2-93e59f76fe502100a66e971acfbc1c58c63f564d.tar.bz2 edk2-93e59f76fe502100a66e971acfbc1c58c63f564d.zip |
MdeModulePkg/Browser: Fix conflicting policy in getting default of checkbox
We have added a new policy to get default value for question:
get default from other default id if current default is not specified.
But when getting default value for checkbox, if the default
flag is not set, it will set the default value to FALSE for checkbox.
This behavior in checkbox conflicts with the new added policy,
so now we move this behavior to the end of getting default form other
default id.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index cd3c8cc98b..00f4b4136c 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -4241,8 +4241,6 @@ ReGetDefault: ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) != 0))
) {
HiiValue->Value.b = TRUE;
- } else {
- HiiValue->Value.b = FALSE;
}
return EFI_SUCCESS;
@@ -4269,6 +4267,11 @@ ReGetDefault: //
Status = EFI_NOT_FOUND;
switch (Question->Operand) {
+ case EFI_IFR_CHECKBOX_OP:
+ HiiValue->Value.b = FALSE;
+ Status = EFI_SUCCESS;
+ break;
+
case EFI_IFR_NUMERIC_OP:
//
// Take minimum value as numeric default value
|