From 572c2aa54dc1f4ca30671ed7780beb59b1c40ec8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 20 Dec 2020 19:46:20 +0000 Subject: [PATCH] Fix drag&drop of VST2 plugins under macOS --- source/frontend/widgets/racklistwidget.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/frontend/widgets/racklistwidget.py b/source/frontend/widgets/racklistwidget.py index 641137c0f..3208dd4ca 100644 --- a/source/frontend/widgets/racklistwidget.py +++ b/source/frontend/widgets/racklistwidget.py @@ -252,6 +252,12 @@ class RackListWidget(QListWidget): self.clearFocus() def isDragUrlValid(self, filename): + if not filename: + return False + + if filename[-1] == '/': + filename = filename[:-1] + lfilename = filename.lower() if os.path.isdir(filename): @@ -333,6 +339,12 @@ class RackListWidget(QListWidget): filename = url.toLocalFile() + if not filename: + continue + + if filename[-1] == '/': + filename = filename[:-1] + if not self.host.load_file(filename): CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"), self.tr("Failed to load file"),