Added Setting save logic

- Now settings are saved on dialog close automatically