Browse Source

Allow dragging the new module after selecting in the Module Browser

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
fd603b7ec5
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/app/ModuleBrowser.cpp

+ 3
- 2
src/app/ModuleBrowser.cpp View File

@@ -222,8 +222,9 @@ void ModuleBox::onButton(const event::Button &e) {
ModuleWidget *moduleWidget = model->createModuleWidget();
assert(moduleWidget);
APP->scene->rackWidget->addModuleAtMouse(moduleWidget);
// This is a bit nonstandard/unsupported usage, but pretend the moduleWidget was clicked so it can be dragged in the RackWidget
// e.consume(moduleWidget);

// Pretend the moduleWidget was clicked so it can be dragged in the RackWidget
e.consume(moduleWidget);

// Close Module Browser
BrowserOverlay *overlay = getAncestorOfType<BrowserOverlay>();


Loading…
Cancel
Save