Fixup for module updates

This commit is contained in:
falkTX 2022-03-20 03:39:20 +00:00
parent 5fc282b84f
commit f1b66f66f7
3 changed files with 39 additions and 17 deletions

View file

@ -0,0 +1,34 @@
#include "../Bidoo/src/plugin.hpp"
#undef ModuleWidget
void InstantiateExpanderItem::onAction(const event::Action &e) {
engine::Module* module = model->createModule();
APP->engine->addModule(module);
ModuleWidget* mw = model->createModuleWidget(module);
if (mw) {
APP->scene->rack->setModulePosNearest(mw, posit);
APP->scene->rack->addModule(mw);
history::ModuleAdd *h = new history::ModuleAdd;
h->name = "create expander module";
h->setModule(mw);
APP->history->push(h);
}
}
json_t* BidooModule::dataToJson() {
return nullptr;
}
void BidooModule::dataFromJson(json_t*) {
}
void BidooWidget::appendContextMenu(Menu*) {
}
void BidooWidget::prepareThemes(const std::string& filename) {
setPanel(APP->window->loadSvg(filename));
}
void BidooWidget::step() {
CardinalModuleWidget::step();
}