          if self._config.tk_vars["runningtask"].get():
              self.wrapper.task.terminate()
          get_images().delete_preview()
          self.quit()
          logger.debug("Closed GUI")
          exit()
 
</s> remove         if tk_vars["runningtask"].get():
 </s> add         if self._config.tk_vars["runningtask"].get(): </s> remove         confirm = messagebox.askokcancel
        confirmtxt = "Processes are still running. Are you sure...?"
        tk_vars = get_config().tk_vars
        if (tk_vars["runningtask"].get()
                and not confirm("Close", confirmtxt)):
            logger.debug("Close Cancelled")
 </s> add         if not self._confirm_close_on_running_task():
            return
        if not self._config.project.confirm_close(): </s> remove         self.wrapper = ProcessWrapper(pathscript)
 </s> add         self.wrapper = ProcessWrapper() </s> remove     def build_gui(self, debug_console):
 </s> add     def build_gui(self, rebuild=False):
        self._last_session.save()
          if self._config.tk_vars["runningtask"].get():
              self.wrapper.task.terminate()
        self._last_session.save()
          get_images().delete_preview()
          self.quit()
          logger.debug("Closed GUI")
          exit()
keep add keep keep keep keep
 GUI Updates (#940)

* lib.gui: Update icons
* tools.cli: Add video filetype flag to mask input
* lib.gui.popup_configure: Refresh GUI on config save
* lib.gui._config: Add Icon size and load last session options
* lib.gui.control_helper - Add control modification tracking
* lib.gui - Add Projects and Last Session
- Main root title handled by projects
- Add Hotkeys
- Create projects module
- split fsw and fst filetypes
- Add last_session saving

* lib.project
- Documentation
- Ask confirm on closing unsaved project
-Fixups

* Track model folder changes
- Shuffle some globals
- Activate System Verbosity for GUI

* lib.gui.utils - Documentation and clean up
- lib.gui.custom_widgets - Create and document

* Add GUI config option to disable auto loading model stats 
scripts/gui.py