From 9af9c405bf38b31b56b3f9f1167b125eaa7e8b34 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Jun 2021 14:36:57 +0100 Subject: [PATCH] Remove favorite plugins from list when they fail to load --- source/frontend/carla_host.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py index 25d319fc5..05aedbb77 100644 --- a/source/frontend/carla_host.py +++ b/source/frontend/carla_host.py @@ -1225,6 +1225,17 @@ class HostWindow(QMainWindow): if not self.host.add_plugin(plugin['build'], plugin['type'], plugin['filename'], None, plugin['label'], plugin['uniqueId'], None, PLUGIN_OPTIONS_NULL): + # remove plugin from favorites + try: + self.fFavoritePlugins.remove(plugin) + except ValueError: + pass + else: + settingsDBf = QSafeSettings("falkTX", "CarlaDatabase2") + settingsDBf.setValue("PluginDatabase/Favorites", self.fFavoritePlugins) + settingsDBf.sync() + del settingsDBf + CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"),