|
@@ -20,9 +20,7 @@ struct PortTooltip : ui::Tooltip { |
|
|
engine::Port* port = portWidget->getPort(); |
|
|
engine::Port* port = portWidget->getPort(); |
|
|
engine::PortInfo* portInfo = portWidget->getPortInfo(); |
|
|
engine::PortInfo* portInfo = portWidget->getPortInfo(); |
|
|
// Label |
|
|
// Label |
|
|
text = portInfo->getName(); |
|
|
|
|
|
text += " "; |
|
|
|
|
|
text += (portWidget->type == engine::Port::INPUT) ? "input" : "output"; |
|
|
|
|
|
|
|
|
text = portInfo->getFullName(); |
|
|
// Description |
|
|
// Description |
|
|
std::string description = portInfo->getDescription(); |
|
|
std::string description = portInfo->getDescription(); |
|
|
if (description != "") { |
|
|
if (description != "") { |
|
@@ -130,8 +128,11 @@ void PortWidget::createContextMenu() { |
|
|
ui::Menu* menu = createMenu(); |
|
|
ui::Menu* menu = createMenu(); |
|
|
WeakPtr<PortWidget> weakThis = this; |
|
|
WeakPtr<PortWidget> weakThis = this; |
|
|
|
|
|
|
|
|
CableWidget* cw = APP->scene->rack->getTopCable(this); |
|
|
|
|
|
|
|
|
engine::PortInfo* portInfo = getPortInfo(); |
|
|
|
|
|
assert(portInfo); |
|
|
|
|
|
menu->addChild(createMenuLabel(portInfo->getFullName())); |
|
|
|
|
|
|
|
|
|
|
|
CableWidget* cw = APP->scene->rack->getTopCable(this); |
|
|
menu->addChild(createMenuItem("Delete top cable", RACK_MOD_SHIFT_NAME "+click", |
|
|
menu->addChild(createMenuItem("Delete top cable", RACK_MOD_SHIFT_NAME "+click", |
|
|
[=]() { |
|
|
[=]() { |
|
|
if (!weakThis) |
|
|
if (!weakThis) |
|
@@ -141,6 +142,14 @@ void PortWidget::createContextMenu() { |
|
|
!cw |
|
|
!cw |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
|
|
|
// TODO |
|
|
|
|
|
if (type == engine::Port::INPUT) { |
|
|
|
|
|
menu->addChild(createMenuItem("Duplicate cable", RACK_MOD_CTRL_NAME "+drag", NULL, true)); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
menu->addChild(createMenuItem("Create new cable", RACK_MOD_CTRL_NAME "+drag", NULL, true)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// TODO |
|
|
// TODO |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|