Ask before closing the window (with the button top-right) to save the model before closing the window