From a2f5b4fbf50d071ee07daafd8c44b830c9229902 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 5 Apr 2015 16:01:15 +0200 Subject: [PATCH] Fix carla-control/plugin activating plugins when shown; Misc changes --- source/backend/engine/CarlaEngine.cpp | 5 +++-- source/backend/engine/CarlaEngineOsc.cpp | 8 ++++++++ source/carla_host.py | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index 4d811d926..6912ea473 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -595,14 +595,15 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, if (plugin->getHints() & PLUGIN_CAN_VOLUME) plugin->setVolume(oldVolume, true, true); - if (wasActive) - plugin->setActive(true, true, true); + plugin->setActive(wasActive, true, true); callback(ENGINE_CALLBACK_RELOAD_ALL, id, 0, 0, 0.0f, nullptr); } else #endif { + plugin->setActive(true, true, false); + ++pData->curPluginCount; callback(ENGINE_CALLBACK_PLUGIN_ADDED, id, 0, 0, 0.0f, plugin->getName()); diff --git a/source/backend/engine/CarlaEngineOsc.cpp b/source/backend/engine/CarlaEngineOsc.cpp index 11a81fd73..9a7242f58 100644 --- a/source/backend/engine/CarlaEngineOsc.cpp +++ b/source/backend/engine/CarlaEngineOsc.cpp @@ -288,6 +288,8 @@ int CarlaEngineOsc::handleMessage(const bool isTCP, const char* const path, cons #ifndef BUILD_BRIDGE // Internal methods + if (std::strcmp(method, "set_option") == 0) + return 0; //handleMsgSetOption(plugin, argc, argv, types); // TODO if (std::strcmp(method, "set_active") == 0) return handleMsgSetActive(plugin, argc, argv, types); if (std::strcmp(method, "set_drywet") == 0) @@ -300,6 +302,8 @@ int CarlaEngineOsc::handleMessage(const bool isTCP, const char* const path, cons return handleMsgSetBalanceRight(plugin, argc, argv, types); if (std::strcmp(method, "set_panning") == 0) return handleMsgSetPanning(plugin, argc, argv, types); + if (std::strcmp(method, "set_ctrl_channel") == 0) + return 0; //handleMsgSetControlChannel(plugin, argc, argv, types); // TODO if (std::strcmp(method, "set_parameter_value") == 0) return handleMsgSetParameterValue(plugin, argc, argv, types); if (std::strcmp(method, "set_parameter_midi_cc") == 0) @@ -310,6 +314,10 @@ int CarlaEngineOsc::handleMessage(const bool isTCP, const char* const path, cons return handleMsgSetProgram(plugin, argc, argv, types); if (std::strcmp(method, "set_midi_program") == 0) return handleMsgSetMidiProgram(plugin, argc, argv, types); + if (std::strcmp(method, "set_custom_data") == 0) + return 0; //handleMsgSetCustomData(plugin, argc, argv, types); // TODO + if (std::strcmp(method, "set_chunk") == 0) + return 0; //handleMsgSetChunk(plugin, argc, argv, types); // TODO if (std::strcmp(method, "note_on") == 0) return handleMsgNoteOn(plugin, argc, argv, types); if (std::strcmp(method, "note_off") == 0) diff --git a/source/carla_host.py b/source/carla_host.py index c51f9e2da..bcb95bda3 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -225,6 +225,9 @@ class HostWindow(QMainWindow): self.ui.tabWidget.removeTab(1) self.ui.tabWidget.tabBar().hide() + if host.isControl: + self.ui.dockWidget.hide() + # ---------------------------------------------------------------------------------------------------- # Set up GUI (disk) @@ -857,9 +860,6 @@ class HostWindow(QMainWindow): self.fPluginList.append(pitem) self.fPluginCount += 1 - if not self.fIsProjectLoading: - pitem.getWidget().setActive(True, True, True) - self.ui.act_plugin_remove_all.setEnabled(self.fPluginCount > 0) @pyqtSlot(int)