MCPcopy Create free account
hub / github.com/VCVRack/Rack / resetModelBoxes

Method resetModelBoxes

src/app/Browser.cpp:576–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574 }
575
576 void resetModelBoxes() {
577 modelContainer->clearChildren();
578 modelOrders.clear();
579 // Iterate plugins
580 // for (int i = 0; i < 100; i++)
581 for (plugin::Plugin* plugin : plugin::plugins) {
582 // Iterate models in plugin
583 int modelIndex = 0;
584 for (plugin::Model* model : plugin->models) {
585 // Create ModelBox
586 ModelBox* modelBox = new ModelBox;
587 modelBox->setModel(model);
588 modelContainer->addChild(modelBox);
589
590 modelOrders[model] = modelIndex;
591 modelIndex++;
592 }
593 }
594 }
595
596 void updateZoom() {
597 modelScroll->offset = math::Vec();

Callers

nothing calls this directly

Calls 4

clearChildrenMethod · 0.80
addChildMethod · 0.80
clearMethod · 0.45
setModelMethod · 0.45

Tested by

no test coverage detected