fix #980,support locked/unlocked layouts
--layouts can be read-only and in such case any settings changes arent saved.