save the project prefs after the project got opened

This is for #9207.
@dangoor I don't know if this is the best way of doing it. Any suggestions? Thanks.