MCPcopy Create free account
hub / github.com/VCVRack/Rack / onPathDrop

Method onPathDrop

src/app/Scene.cpp:357–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356
357void Scene::onPathDrop(const PathDropEvent& e) {
358 if (e.paths.size() >= 1) {
359 const std::string& path = e.paths[0];
360 std::string extension = system::getExtension(path);
361
362 if (extension == ".vcv") {
363 APP->patch->loadPathDialog(path);
364 e.consume(this);
365 return;
366 }
367 if (extension == ".vcvs") {
368 APP->scene->rack->loadSelection(path);
369 e.consume(this);
370 return;
371 }
372 }
373
374 OpaqueWidget::onPathDrop(e);
375}
376
377
378} // namespace app

Callers 1

handleDropMethod · 0.45

Calls 5

getExtensionFunction · 0.85
loadPathDialogMethod · 0.80
consumeMethod · 0.80
loadSelectionMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected