From e3323c78894c2431fceab1b0f6e7d492ce45a797 Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Thu, 1 Jun 2023 20:37:08 +0300 Subject: [PATCH] fix LADISH support Menu items are useful in LADISH sessions, when Carla not ran in NSM mode --- source/frontend/carla_host.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py index fcd10770c..da4290529 100644 --- a/source/frontend/carla_host.py +++ b/source/frontend/carla_host.py @@ -165,6 +165,7 @@ class HostWindow(QMainWindow): self.fPluginDatabaseDialog = None self.fFavoritePlugins = [] + self.fLADISH = False self.fProjectFilename = "" self.fIsProjectLoading = False self.fCurrentlyRemovingAllPlugins = False @@ -205,6 +206,7 @@ class HostWindow(QMainWindow): elif LADISH_APP_NAME: self.fClientName = LADISH_APP_NAME self.fSessionManagerName = "LADISH" + self.fLADISH = True elif NSM_URL and host.nsmOK: self.fClientName = "Carla.tmp" self.fSessionManagerName = "Non Session Manager TMP" @@ -272,7 +274,7 @@ class HostWindow(QMainWindow): self.ui.act_file_refresh.setEnabled(False) self.ui.act_file_refresh.setVisible(False) - if self.fSessionManagerName and not self.host.isPlugin: + if self.fSessionManagerName and not self.fLADISH and not self.host.isPlugin: self.ui.act_file_new.setEnabled(False) self.ui.act_file_open.setEnabled(False) @@ -1092,7 +1094,7 @@ class HostWindow(QMainWindow): if not self.host.isPlugin: self.enableTransport(transportMode != ENGINE_TRANSPORT_MODE_DISABLED) - if self.host.isPlugin or not self.fSessionManagerName: + if self.host.isPlugin or not self.fSessionManagerName or self.fLADISH: self.ui.act_file_open.setEnabled(True) self.ui.act_file_save_as.setEnabled(True) @@ -1135,7 +1137,7 @@ class HostWindow(QMainWindow): self.ui.act_engine_start.setEnabled(True) self.ui.act_engine_stop.setEnabled(False) - if self.host.isPlugin or not self.fSessionManagerName: + if self.host.isPlugin or not self.fSessionManagerName or self.fLADISH: self.ui.act_file_open.setEnabled(False) self.ui.act_file_save_as.setEnabled(False)