After the collapse-all button has been clicked, the expanded keys entry will be empty.
When in this state, clicking on the button should do an expand all operation. When clicked, the Layers control will go through all of the data model, find all nodes with children, and set the expanded keys list to the set of keys (ids).
The button should have a separate icon for in this state - something more related to expand all.