@@ -147,6 +147,9 @@ class CarlaMultiW(QTabWidget): | |||||
self.fPatchbay.saveSettings(settings) | self.fPatchbay.saveSettings(settings) | ||||
#self.fParent.saveSettings(settings) | #self.fParent.saveSettings(settings) | ||||
def showEditDialog(self, pluginId): | |||||
self.fRack.showEditDialog(pluginId) | |||||
# ----------------------------------------------------------------- | # ----------------------------------------------------------------- | ||||
def fixCanvasPreviewSize(self): | def fixCanvasPreviewSize(self): | ||||
@@ -97,6 +97,9 @@ class CarlaDummyW(object): | |||||
def saveSettings(self, settings): | def saveSettings(self, settings): | ||||
pass | pass | ||||
def showEditDialog(self, pluginId): | |||||
pass | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
# Host Window | # Host Window | ||||
@@ -264,6 +264,16 @@ class CarlaPatchbayW(QFrame): | |||||
settings.setValue("HorizontalScrollBarValue", self.fView.horizontalScrollBar().value()) | settings.setValue("HorizontalScrollBarValue", self.fView.horizontalScrollBar().value()) | ||||
settings.setValue("VerticalScrollBarValue", self.fView.verticalScrollBar().value()) | settings.setValue("VerticalScrollBarValue", self.fView.verticalScrollBar().value()) | ||||
def showEditDialog(self, pluginId): | |||||
if pluginId >= self.fPluginCount: | |||||
return | |||||
pitem = self.fPluginList[pluginId] | |||||
if pitem is None: | |||||
return | |||||
pitem.show() | |||||
# ----------------------------------------------------------------- | # ----------------------------------------------------------------- | ||||
# called by PluginEdit, ignored here | # called by PluginEdit, ignored here | ||||
@@ -890,7 +900,7 @@ def canvasCallback(action, value1, value2, valueStr): | |||||
elif action == patchcanvas.ACTION_PLUGIN_EDIT: | elif action == patchcanvas.ACTION_PLUGIN_EDIT: | ||||
pluginId = value1 | pluginId = value1 | ||||
# TODO | |||||
Carla.gui.fContainer.showEditDialog(pluginId) | |||||
elif action == patchcanvas.ACTION_PLUGIN_RENAME: | elif action == patchcanvas.ACTION_PLUGIN_RENAME: | ||||
pluginId = value1 | pluginId = value1 | ||||
@@ -232,6 +232,16 @@ class CarlaRackW(QListWidget): | |||||
def saveSettings(self, settings): | def saveSettings(self, settings): | ||||
pass | pass | ||||
def showEditDialog(self, pluginId): | |||||
if pluginId >= self.fPluginCount: | |||||
return | |||||
pitem = self.fPluginList[pluginId] | |||||
if pitem is None: | |||||
return | |||||
pitem.widget.slot_showEditDialog(True) | |||||
# ----------------------------------------------------------------- | # ----------------------------------------------------------------- | ||||
@pyqtSlot() | @pyqtSlot() | ||||
@@ -2451,9 +2451,6 @@ class CanvasBox(QGraphicsItem): | |||||
act_p_rename = menu.addAction("&Rename...") | act_p_rename = menu.addAction("&Rename...") | ||||
act_p_remove = menu.addAction("Re&move") | act_p_remove = menu.addAction("Re&move") | ||||
# TODO | |||||
act_p_edit.setVisible(False) | |||||
if not self.m_plugin_ui: | if not self.m_plugin_ui: | ||||
act_p_ui.setVisible(False) | act_p_ui.setVisible(False) | ||||
@@ -2475,7 +2472,10 @@ class CanvasBox(QGraphicsItem): | |||||
act_selected = menu.exec_(event.screenPos()) | act_selected = menu.exec_(event.screenPos()) | ||||
if act_selected == act_x_disc_all: | |||||
if act_selected is None: | |||||
pass | |||||
elif act_selected == act_x_disc_all: | |||||
for port_id in port_con_list: | for port_id in port_con_list: | ||||
canvas.callback(ACTION_PORTS_DISCONNECT, port_id, 0, "") | canvas.callback(ACTION_PORTS_DISCONNECT, port_id, 0, "") | ||||