FR: Layer dropdowns should both remember expanded/collapsed branches

The layer dropdowns in the status bar and the Object Properties panel handle expanded/collapsed branches differently.

The status bar dropdown remembers any branches I expand or collapse between uses. The Object Properties dropdown inherits that state, but doesn’t remember changes made within its own dropdown.

For example:

  1. I collapse several parent layers in the status bar dropdown.
  2. I open the Object Properties layer dropdown, and those branches are collapsed there too.
  3. I expand or collapse different branches in Object Properties and assign a layer.
  4. When I reopen that dropdown, my changes are gone: it returns to the state last saved through the status bar dropdown.

This is unintuitive because both dropdowns let me change the expansion state, but only one saves it.

Could both dropdowns update and remember the shared expanded/collapsed state, regardless of where the changes are made?