Added saving of the current photo you are viewing if the layout is changed.