From f4da514bb8a9d1a7e2fb1b3e4a8709b6bc898d16 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 11 Feb 2018 22:12:02 -0500 Subject: [PATCH] Reset rack scroll offset when rack patch is cleared --- src/app/RackWidget.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index 82718573..4c6da163 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -57,24 +57,7 @@ void RackWidget::clear() { moduleContainer->clearChildren(); lastPath = ""; -/* - // Add all modules to rack - Vec pos; - for (Plugin *plugin : gPlugins) { - for (Model *model : plugin->models) { - ModuleWidget *moduleWidget = model->createModuleWidget(); - moduleContainer->addChild(moduleWidget); - // Move module nearest to the mouse position - Rect box; - box.size = moduleWidget->box.size; - box.pos = pos; - requestModuleBoxNearest(moduleWidget, box); - pos.x += box.size.x; - } - pos.y += RACK_GRID_HEIGHT; - pos.x = 0; - } -*/ + gRackScene->scrollWidget->offset = Vec(0, 0); } void RackWidget::reset() {