          ----------
          *args: tuple
              Unused, but required for tkinter callback.
          """
          logger.trace("Refreshing swapped faces. args: %s", args)  # type: ignore
          self._tk_vars["busy"].set(True)
          self._config_tools.update_config()
          with self._lock:
              assert self._cli_frame is not None
              self._patch.converter_arguments = self._cli_frame.convert_args
              self._patch.current_config = self._config_tools.config
 
</s> remove             self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        logger.trace("Refreshed swapped faces")  # type: ignore
 </s> add         self._dispatcher.set_needs_patch()
        logger.debug("Patched swapped faces") </s> remove         """ Load new faces to display in preview.
 </s> add         """ Patch faces with current convert settings. </s> remove     def _available_masks(self) -> List[str]:
        """ list: The mask names that are available for every face in the alignments file """
        retval = [key
                  for key, val in self._samples.alignments.mask_summary.items()
                  if val == self._samples.alignments.faces_count]
        return retval
 </s> add     def config_tools(self) -> "ConfigTools":
        """ :class:`ConfigTools`: The object responsible for parsing configuration options and
        updating to/from the GUI """
        return self._config_tools

    @property
    def dispatcher(self) -> "Dispatcher":
        """ :class:`Dispatcher`: The object responsible for triggering events and variables and
        handling global GUI state """
        return self._dispatcher

    @property
    def display(self) -> FacesDisplay:
        """ :class:`~tools.preview.viewer.FacesDisplay`: The object that holds the sample,
        converted and patched faces """
        return self._display

    @property
    def lock(self) -> Lock:
        """ :class:`threading.Lock`: The threading lock object for the Preview GUI """
        return self._lock

    @property
    def progress_bar(self) -> "BusyProgressBar":
        """ :class:`~tools.preview.control_panels.BusyProgressBar`: The progress bar that indicates
        a swap/patch thread is running """
        assert self._cli_frame is not None
        return self._cli_frame.busy_progress_bar

    def update_display(self):
        """ Update the images in the canvas and redraw """
        if not hasattr(self, "_image_canvas"):  # On first call object not yet created
            return
        assert self._image_canvas is not None
        self._image_canvas.reload() </s> remove         logger.trace("Patching faces")  # type: ignore
 </s> add         logger.debug("Patching faces")
        logger.debug("Patching swapped faces. args: %s", args)
        self._dispatcher.set_busy()
          ----------
          *args: tuple
              Unused, but required for tkinter callback.
          """
        logger.debug("Patching swapped faces. args: %s", args)
        self._dispatcher.set_busy()
        logger.debug("Patching swapped faces. args: %s", args)
        self._dispatcher.set_busy()
          self._config_tools.update_config()
          with self._lock:
              assert self._cli_frame is not None
              self._patch.converter_arguments = self._cli_frame.convert_args
              self._patch.current_config = self._config_tools.config
keep keep keep keep replace replace keep keep keep keep keep
 bugfix:
    - preview tool - Prevent tkinter variables from exiting main thread
refactor:
    - preview tool - Split module to smaller sub-modules + docs, locales
Typing:
    - tools.preview.cli
Unit test:
    - tools.preview.viewer 
tools/preview/preview.py