/* Initialize the SettingChangedFlag variable in the display form.  */
VOID UpdateDataChangedFlag(VOID)
/* Initialize the SettingChangedFlag variable in the display form.  */
VOID UpdateDataChangedFlag(VOID)
{
  LIST_ENTRY            *Link;
  FORM_BROWSER_FORMSET  *LocalFormSet;
  gDisplayFormData.SettingChangedFlag = FALSE;
  if (IsNvUpdateRequiredForForm (gCurrentSelection->Form)) {
    gDisplayFormData.SettingChangedFlag = TRUE;
    return;
  }
  switch (gBrowserSettingScope) {
    case SystemLevel:
      Link = GetFirstNode (&gBrowserFormSetList);
      while (!IsNull (&gBrowserFormSetList, Link)) {
        LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
        if (IsNvUpdateRequiredForFormSet (LocalFormSet)) {
          gDisplayFormData.SettingChangedFlag = TRUE;
          return;
        }
        Link = GetNextNode (&gBrowserFormSetList, Link);
      }
      break;
    case FormSetLevel:
      if (IsNvUpdateRequiredForFormSet (gCurrentSelection->FormSet)) {
        gDisplayFormData.SettingChangedFlag = TRUE;
        return;
      }
      break;
    default:
      break;
  }
}