Fix parent visibility: parent visible by own membership OR derived from children
visibleTracks pass 1 now evaluates every node (parent or leaf) by its own membership, so an untagged folder carrying its own FX/media shows in Arrange (its default) as well as any mode derived from its children. Adds case-matrix tests; updates the nested-Arrange assertion to the corrected rule.
This commit is contained in:
@@ -150,8 +150,9 @@ private:
|
||||
// -- Folder tree (INPUT, not stored) ----------------------------------------
|
||||
//
|
||||
// The shell builds this from I_FOLDERDEPTH each time and passes it to a visibility
|
||||
// query. A node is a leaf or a parent; a parent is visible in every mode any of
|
||||
// its descendant leaves belongs to, and is never parked. The master track is
|
||||
// query. A node is a leaf or a parent; a parent is visible in a mode if it belongs
|
||||
// to that mode by its own membership OR any of its descendant leaves does, and is
|
||||
// never parked. The master track is
|
||||
// modeled implicitly (always visible, never touched) and is NOT a node here.
|
||||
struct FolderNode {
|
||||
std::string guid;
|
||||
@@ -273,8 +274,11 @@ public:
|
||||
bool leafBelongsToMode(const std::string& guid, const std::string& modeId) const;
|
||||
|
||||
// The set of track GUIDs visible in `modeId`, tree-aware: active leaves,
|
||||
// show-both leaves, and every parent with at least one descendant leaf in the
|
||||
// mode. Untagged leaves count as Arrange. Stale GUIDs in the tree are tolerated.
|
||||
// show-both leaves, and every parent that EITHER belongs to the mode by its own
|
||||
// membership OR has at least one descendant visible in the mode. Untagged nodes
|
||||
// (leaf or folder) count as Arrange, so an untagged folder carrying its own
|
||||
// FX/media shows in Arrange even when none of its children do, and additionally
|
||||
// shows in a child's mode by derivation. Stale GUIDs in the tree are tolerated.
|
||||
// The master is not represented (always visible; the shell never touches it).
|
||||
std::set<std::string> visibleTracks(const FolderTree& tree,
|
||||
const std::string& modeId) const;
|
||||
|
||||
Reference in New Issue
Block a user