Save preferences after every dialogue update, not just on application exit.