From b1b294725db08f2d3e1003d6fd1946529966820b Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 11 Oct 2021 05:52:11 -0400 Subject: [PATCH] Allow dragging/dropping .vcvs selection file on Scene. --- src/app/Scene.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/Scene.cpp b/src/app/Scene.cpp index ba620c95..1f0871b5 100644 --- a/src/app/Scene.cpp +++ b/src/app/Scene.cpp @@ -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);