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

Method CollapseGroup

lib/macro/macro-tree.cpp:861–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861void MacroTreeModel::CollapseGroup(std::shared_ptr<Macro> item)
862{
863 auto idx = GetItemModelIndex(item);
864 if (idx == -1 || !item->IsGroup() || !item->GroupSize() ||
865 item->IsCollapsed()) {
866 return;
867 }
868
869 item->SetCollapsed(true);
870 Reset(_macros);
871
872 _mt->selectionModel()->clear();
873 assert(IsInValidState());
874}
875
876void MacroTree::Reset(std::deque<std::shared_ptr<Macro>> &macros,
877 bool highlight)

Callers 1

ExpandClickedMethod · 0.80

Calls 4

IsGroupMethod · 0.80
GroupSizeMethod · 0.80
IsCollapsedMethod · 0.80
SetCollapsedMethod · 0.45

Tested by

no test coverage detected