New CountVisitor to count the number of sources in session

Session size is the number of elements, use CountVisitor to count the total number of sources inside (recursively through SessionSources).
This commit is contained in:
Bruno Herbelin
2022-04-09 00:35:20 +02:00
parent f2db10d29a
commit 8fef0052a3
15 changed files with 353 additions and 148 deletions

View File

@@ -5407,7 +5407,7 @@ void Navigator::Render()
// hack to show more sources if not enough space; make source icons smaller...
ImVec2 sourceiconsize(icon_width, icon_width);
if (sourcelist_height - 2.f * icon_width < Mixer::manager().session()->numSource() * icon_width )
if (sourcelist_height - 2.f * icon_width < Mixer::manager().session()->size() * icon_width )
sourceiconsize.y *= 0.75f;
// Left bar top