Browse Source

Allow dragging-and-dropping script onto module panel.

tags/v1.1.1
Andrew Belt 5 years ago
parent
commit
7d14685ff4
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/Prototype.cpp

+ 6
- 0
src/Prototype.cpp View File

@@ -397,6 +397,12 @@ struct PrototypeWidget : ModuleWidget {
menu->addChild(saveScriptItem);
}

void onPathDrop(const event::PathDrop& e) override {
Prototype* module = dynamic_cast<Prototype*>(this->module);
if (module && !e.paths.empty()) {
module->setScriptString(e.paths[0], "");
}
}
};




Loading…
Cancel
Save