Saves and restores MainView widget state