Binder folders forget open/closed state

Somewhere along the line Binder folders started forgetting their twiddle (open/closed) state.

Here are three easy ways to induce this. Suppose you’ve a parent folder in Draft with subfolders in it, each of which contains some documents. Suppose all those subfolders are twiddled open. Twiddle closed the parent folder. Now, do one of the following:

  1. Create a new item anywhere in the Binder, or
  2. Move any item anywhere in the Binder, or
  3. Close the project and immediately reopen.

When you twiddle the original parent folder back open, all its subfolders will be shut. A rebuke!

Judging by my grief in confronting this behavior I surmise Scrivener did not used to be so recalcitrant.

Apologies if this has already been reported. I was not clever enough to connive the search terms that would find precedence for it.

[Still driving my ol’ macOS High Sierra. Gets good mileage.]

For future reference, the View → Outline → Expand/Collapse All commands may be helpful. Note that these will affect either the Outliner view or the Binder, depending on which has the focus.

I confirm that this happens in MacOS 11.5. However, I have no idea whether this is new behaviour, as I usually either split or duplicate to create new files.

Hi,

This is actually expected behaviour, and it’s always behaved like this. macOS’s outliner automatically remembers the expanded state of sub-items when a folder is closed during the session, but when you save, close and reload the project, such states are forgotten. On save, Scrivener saves the expanded states by enumerating through visible items and checking if they are expanded or collapsed. Anything inside a collapsed folder does not have its state saved and so will be considered collapsed.

I don’t think there’s a good way available of expanding hidden folders on load, because you can only expand visible items. I’ll have a thing about it, though, as it would be nice if it could save the hidden states too.

All the best,
Keith

Thanks, Keith.

I am thinking this reduces the apparent bug to the fact that the above is not currently holding true. The expanded state of closed folders is immediately forgotten when most any other action is taken on the Binder.

Ah, you’re right, I was wrong - the state of sub-items isn’t just lost when the project is closed, but also whenever the outline is reloaded, which can be triggered by a number of actions. At that point, Apple’s magic internal code remembering the states is cleared, it seems.

All the best,
Keith