'Save state in the settings'

def closeEvent(self, event):

    commit_msg = self.commitmsgeditor.commit_message(raw=True)
    self.model.save_commitmsg(msg=commit_msg)
    standard.MainWindow.closeEvent(self, event)
