                  for name, image in self._preview_buffer.items():
                      if (name not in self._images or  # new preview or preview was closed
                              not plt.fignum_exists(self._images[name][0].number)):
                          self._create_resizable_window(name, image.shape)
                          if self._full_size:  # This can only be true if preview was closed
                              self._set_resize_callback()
                      plt.figure(name)
                      plt.imshow(image)
                  self._needs_update = False
              logger.debug("preview updated")  # type: ignore
 
</s> remove         if self._full_size:
 </s> add         if self._triggers["full_size"]: </s> remove     @property
    def _toggle_size(self) -> bool:
        return self._full_size

    @_toggle_size.setter
    def _toggle_size(self, value: bool) -> None:  # pylint:disable=unused-argument
        """ Toggle between actual size and screen-fit size.

        Parameters
        ----------
        value: bool
            Unused, but required for setter. The size will check the previous state and switch it
            to the opposite state
        """
        self._full_size = not self._full_size
 </s> add     def _toggle_size(self) -> None:  # pylint:disable=unused-argument
        """ Toggle between actual size and screen-fit size. """
        self._triggers["full_size"] = not self._triggers["full_size"] </s> remove                 logger.debug("Generated preview for GUI: '%s'", img)
 </s> add                 logger.debug("Generated preview for GUI: '%s'", imgfile) </s> remove         then resets :attr:`_toggle_mask` back to ``False``
 </s> add         then resets mask toggle back to ``False``
                        if self._triggers["full_size"]:  # Can only be true if preview was closed
                  for name, image in self._preview_buffer.items():
                      if (name not in self._images or  # new preview or preview was closed
                              not plt.fignum_exists(self._images[name][0].number)):
                          self._create_resizable_window(name, image.shape)
                        if self._triggers["full_size"]:  # Can only be true if preview was closed
                              self._set_resize_callback()
                      plt.figure(name)
                      plt.imshow(image)
                  self._needs_update = False
              logger.debug("preview updated")  # type: ignore
keep keep keep keep replace keep keep keep keep keep
 bugfix: Update preview screen in GUI 
scripts/train.py