Browse Source

Reset rack scroll offset when rack patch is cleared

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
f4da514bb8
1 changed files with 1 additions and 18 deletions
  1. +1
    -18
      src/app/RackWidget.cpp

+ 1
- 18
src/app/RackWidget.cpp View File

@@ -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() {


Loading…
Cancel
Save