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

Method MoveToBeginningOfGroup

lib/macro/macro-tree.cpp:535–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535void MacroTreeModel::MoveToBeginningOfGroup(std::shared_ptr<Macro> item,
536 std::shared_ptr<Macro> group)
537{
538 auto it = std::find(_macros.begin(), _macros.end(), item);
539 assert(it != _macros.end());
540 std::shared_ptr<Macro> tmp = *it;
541 _macros.erase(it);
542 it = std::find(_macros.begin(), _macros.end(), group);
543 assert(it != _macros.end());
544 _macros.insert(std::next(it), tmp);
545
546 Reset(_macros);
547}
548
549void MacroTreeModel::Remove(std::shared_ptr<Macro> item)
550{

Callers 1

AddToGroupMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected