MdeModulePkg/SetupBrowserDxe: Get default from callback for orderedList
For orderedlist question, the value is stored in a buffer, not in HiiValue. So when need to get default value from callback function for orderedlist, need to pass the buffer. This patch is to enhance this logic. 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: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
126f3b1de0
commit
7f36d62918
@ -3897,6 +3897,7 @@ GetQuestionDefault (
|
|||||||
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
||||||
INTN Action;
|
INTN Action;
|
||||||
CHAR16 *NewString;
|
CHAR16 *NewString;
|
||||||
|
EFI_IFR_TYPE_VALUE *TypeValue;
|
||||||
|
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
StrValue = NULL;
|
StrValue = NULL;
|
||||||
@ -3917,6 +3918,13 @@ GetQuestionDefault (
|
|||||||
// 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority)
|
// 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority)
|
||||||
//
|
//
|
||||||
HiiValue = &Question->HiiValue;
|
HiiValue = &Question->HiiValue;
|
||||||
|
TypeValue = &HiiValue->Value;
|
||||||
|
if (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue != NULL) {
|
||||||
|
//
|
||||||
|
// For orderedlist, need to pass the BufferValue to Callback function.
|
||||||
|
//
|
||||||
|
TypeValue = (EFI_IFR_TYPE_VALUE *) Question->BufferValue;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get Question defaut value from call back function.
|
// Get Question defaut value from call back function.
|
||||||
@ -3930,7 +3938,7 @@ GetQuestionDefault (
|
|||||||
Action,
|
Action,
|
||||||
Question->QuestionId,
|
Question->QuestionId,
|
||||||
HiiValue->Type,
|
HiiValue->Type,
|
||||||
&HiiValue->Value,
|
TypeValue,
|
||||||
&ActionRequest
|
&ActionRequest
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user