Save splitter state in app settings. (also moved the function to better loc).