Browse Source

Allow dragging/dropping .vcvs selection file on Scene.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
b1b294725d
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      src/app/Scene.cpp

+ 8
- 1
src/app/Scene.cpp View File

@@ -348,11 +348,18 @@ void Scene::onHoverKey(const HoverKeyEvent& e) {
void Scene::onPathDrop(const PathDropEvent& e) {
if (e.paths.size() >= 1) {
const std::string& path = e.paths[0];
if (system::getExtension(path) == ".vcv") {
std::string extension = system::getExtension(path);

if (extension == ".vcv") {
APP->patch->loadPathDialog(path);
e.consume(this);
return;
}
if (extension == ".vcvs") {
APP->scene->rack->loadSelection(path);
e.consume(this);
return;
}
}

OpaqueWidget::onPathDrop(e);


Loading…
Cancel
Save