MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / CountItemsVisibleInModel

Function CountItemsVisibleInModel

lib/macro/macro-tree.cpp:510–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510static inline int
511CountItemsVisibleInModel(const std::deque<std::shared_ptr<Macro>> &macros)
512{
513 int count = macros.size();
514 for (const auto &m : macros) {
515 if (m->IsGroup() && m->IsCollapsed()) {
516 count -= m->GroupSize();
517 }
518 }
519 return count;
520}
521
522void MacroTreeModel::Add(std::shared_ptr<Macro> item)
523{

Callers 2

AddMethod · 0.85
rowCountMethod · 0.85

Calls 4

sizeMethod · 0.80
IsGroupMethod · 0.80
IsCollapsedMethod · 0.80
GroupSizeMethod · 0.80

Tested by

no test coverage detected