              logger.debug("Adding section: '%s')", config_section)
              self._config.insert_config_section(config_section,
                                                 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):
                      # retain saved values that have not been updated
 
</s> remove                 if ((section is not None and config_section != section)
                        or config_section not in self.tk_vars):
 </s> add                 if ((section is not None and section_name != section)
                        or section_name not in self.tk_vars): </s> remove         for config_section, items in self._config.defaults.items():
            logger.debug("Adding section: '%s')", config_section)
            self._config.insert_config_section(config_section,
                                               items["helptext"],
 </s> add         for section_name, sect in self._config.defaults.items():
            logger.debug("Adding section: '%s')", section_name)
            self._config.insert_config_section(section_name,
                                               sect.helptext, </s> remove                     new_opt = self._config.get(config_section, item)
 </s> add                     new_opt = self._config.get(section_name, item) </s> remove         for section, items in config.defaults.items():
            logger.debug("Adding section: '%s')", section)
            config.insert_config_section(section, items["helptext"], config=new_config)
            for item, options in items.items():
                if item == "helptext":
                    continue
                if page_only and section != lookup:
                    # Keep existing values for pages we are not updating
                    new_opt = config.get(section, item)
                    logger.debug("Retain existing value '%s' for %s",
                                 new_opt, ".".join([section, item]))
                else:
                    # Get currently selected value
                    key = category
                    if section != "global":
                        key += f"|{section.replace('.', '|')}"
                    new_opt = self._config_cpanel_dict[key]["options"][item].get()
                    logger.debug("Updating value to '%s' for %s",
                                 new_opt, ".".join([section, item]))
                helptext = config.format_help(options["helptext"], is_section=False)
                new_config.set(section, helptext)
                if options["type"] == list:  # Comma separated multi select options
                    new_opt = ", ".join(new_opt if isinstance(new_opt, list) else new_opt.split())
                new_config.set(section, item, str(new_opt))
        config.config = new_config
 </s> add         config.config = self._get_new_config(page_only, config, category, lookup) </s> remove         for section, items in self.defaults.items():
            logger.debug("Adding section: '%s')", section)
            self.insert_config_section(section, items["helptext"])
            for item, opt in items.items():
 </s> add         for name, section in self.defaults.items():
            logger.debug("Adding section: '%s')", name)
            self.insert_config_section(name, section.helptext)
            for item, opt in section.items.items():
            for item, options in sect.items.items():
              logger.debug("Adding section: '%s')", config_section)
              self._config.insert_config_section(config_section,
                                                 items["helptext"],
                                                 config=new_config)
            for item, options in sect.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):
                      # retain saved values that have not been updated
keep keep keep keep replace keep keep keep keep keep
 Preview - Allow mask color/opacity configuration
  - typing: lib.config
  - docs: lib.config
  - bugfix: popup_configure - keep assets on top 
tools/preview/control_panels.py