          with self._lock:
              retval = self._toggle_mask
              if retval:
                  logger.debug("Sending toggle mask")
                  self._toggle_mask = False
          return retval
  
      def should_refresh(self) -> bool:
          """ Check whether the preview should be updated and return the value. If ``True`` is
          returned then resets :attr:`_refresh` back to ``False``
 
</s> remove         returned then resets :attr:`_refresh` back to ``False``
 </s> add         returned then resets the refresh trigger back to ``False`` </s> remove         then resets :attr:`_toggle_mask` back to ``False``
 </s> add         then resets mask toggle back to ``False`` </s> remove                 self._refresh = False
 </s> add                 self._triggers["refresh"] = False </s> remove             retval = self._toggle_mask
 </s> add             retval = self._triggers["toggle_mask"] </s> remove                 self._save = False
 </s> add                 self._triggers["save"] = False
                self._triggers["toggle_mask"] = False
          with self._lock:
              retval = self._toggle_mask
              if retval:
                  logger.debug("Sending toggle mask")
                self._triggers["toggle_mask"] = False
          return retval
  
      def should_refresh(self) -> bool:
          """ Check whether the preview should be updated and return the value. If ``True`` is
          returned then resets :attr:`_refresh` back to ``False``
keep keep keep keep replace keep keep keep keep keep
 bugfix: Update preview screen in GUI 
scripts/train.py