@@ -75,9 +75,9 @@ struct Module { | |||||
/** Called when the engine sample rate is changed | /** Called when the engine sample rate is changed | ||||
*/ | */ | ||||
virtual void onSampleRateChange() {} | virtual void onSampleRateChange() {} | ||||
/** Called when module is created by the Add Module popup, cloning, or when loading a patch or autosave */ | |||||
/** Called when module is created by the Module Browser or by cloning, NOT when a patch is loaded */ | |||||
virtual void onCreate() {} | virtual void onCreate() {} | ||||
/** Called when user explicitly deletes the module, not when Rack is closed or a new patch is loaded */ | |||||
/** Called when user explicitly deletes the module, NOT when Rack is closed or a new patch is loaded */ | |||||
virtual void onDelete() {} | virtual void onDelete() {} | ||||
/** Called when user clicks Initialize in the module context menu */ | /** Called when user clicks Initialize in the module context menu */ | ||||
virtual void onReset() { | virtual void onReset() { | ||||
@@ -139,7 +139,7 @@ struct ModelItem : BrowserListItem { | |||||
ModuleWidget *moduleWidget = model->createModuleWidget(); | ModuleWidget *moduleWidget = model->createModuleWidget(); | ||||
if (!moduleWidget) | if (!moduleWidget) | ||||
return; | return; | ||||
gRackWidget->moduleContainer->addChild(moduleWidget); | |||||
gRackWidget->addModule(moduleWidget); | |||||
// Move module nearest to the mouse position | // Move module nearest to the mouse position | ||||
moduleWidget->box.pos = gRackWidget->lastMousePos.minus(moduleWidget->box.size.div(2)); | moduleWidget->box.pos = gRackWidget->lastMousePos.minus(moduleWidget->box.size.div(2)); | ||||
gRackWidget->requestModuleBoxNearest(moduleWidget, moduleWidget->box); | gRackWidget->requestModuleBoxNearest(moduleWidget, moduleWidget->box); | ||||
@@ -44,7 +44,7 @@ int main(int argc, char* argv[]) { | |||||
loggerInit(devMode); | loggerInit(devMode); | ||||
// Log environment | // Log environment | ||||
info("Rack %s", gApplicationVersion.c_str()); | |||||
info("%s %s", gApplicationName.c_str(), gApplicationVersion.c_str()); | |||||
if (devMode) | if (devMode) | ||||
info("Development mode"); | info("Development mode"); | ||||
info("Global directory: %s", assetGlobal("").c_str()); | info("Global directory: %s", assetGlobal("").c_str()); | ||||