                                                 items["helptext"],
                                                 config=new_config)
              for item, options in items.items():
                  if item == "helptext":
                      continue
                  if ((section is not None and config_section != section)
                          or config_section not in self.tk_vars):
                      new_opt = options.value  # Keep saved item for other sections
                      logger.debug("Retaining option: (item: '%s', value: '%s')", item, new_opt)
                  else:
 
</s> remove                     new_opt = options.value  # Keep saved item for other sections
 </s> add                     # retain saved values that have not been updated
                    new_opt = self._config.get(config_section, item) </s> remove                     options.set_initial_value(new_opt)
                helptext = self._config.format_help(options.helptext, is_section=False)
 </s> add                     self._config_dicts[config_section][item].set_initial_value(new_opt)

                helptext = self._config.format_help(options["helptext"], is_section=False) </s> remove         for config_section, items in self._config_dicts.items():
 </s> add         for config_section, items in self._config.defaults.items(): </s> remove         config_dicts = dict()
 </s> add         config_dicts = {} </s> remove                     config_dicts.setdefault(section, dict())[key] = val
 </s> add                     config_dicts.setdefault(section, {})[key] = val
                    continue  # helptext already written at top
                                                 items["helptext"],
                                                 config=new_config)
              for item, options in items.items():
                  if item == "helptext":
                    continue  # helptext already written at top
                  if ((section is not None and config_section != section)
                          or config_section not in self.tk_vars):
                      new_opt = options.value  # Keep saved item for other sections
                      logger.debug("Retaining option: (item: '%s', value: '%s')", item, new_opt)
                  else:
keep keep keep keep replace keep keep keep keep keep
 bugfix: Preview Tool, ensure all config items are written 
tools/preview/preview.py