          with self._lock:
              retval = self._save
              if retval:
                  logger.debug("Sending should save")
                  self._save = False
          return retval
  
      def should_quit(self) -> bool:
          """ Check whether an exit request has been made.
  
 
</s> remove             retval = self._save
 </s> add             retval = self._triggers["save"] </s> remove             retval = self._quit
 </s> add             retval = self._triggers["quit"] </s> remove                 self._refresh = False
 </s> add                 self._triggers["refresh"] = False </s> remove                 self._toggle_mask = False
 </s> add                 self._triggers["toggle_mask"] = False </s> remove             retval = self._refresh
 </s> add             retval = self._triggers["refresh"]
                self._triggers["save"] = False
          with self._lock:
              retval = self._save
              if retval:
                  logger.debug("Sending should save")
                self._triggers["save"] = False
          return retval
  
      def should_quit(self) -> bool:
          """ Check whether an exit request has been made.
  
keep keep keep keep replace keep keep keep keep keep
 bugfix: Update preview screen in GUI 
scripts/train.py