save LayoutConfiguration before switching layout