diff --git a/src/app/PortWidget.cpp b/src/app/PortWidget.cpp index 1ebc7de0..12abb379 100644 --- a/src/app/PortWidget.cpp +++ b/src/app/PortWidget.cpp @@ -180,6 +180,8 @@ void PortWidget::createContextMenu() { else { } + menu->addChild(new ui::MenuSeparator); + // Create cable items bool createCableDisabled = (type == engine::Port::INPUT) && topCw; for (NVGcolor color : settings::cableColors) { @@ -194,9 +196,13 @@ void PortWidget::createContextMenu() { if (!cws.empty()) { menu->addChild(new ui::MenuSeparator); - for (CableWidget* cw : cws) { - PortCableItem* item = createMenuItem(" XXXX", "Click+drag"); - item->color = nvgRGBf(1, 0, 0); + for (auto it = cws.rbegin(); it != cws.rend(); it++) { + CableWidget* cw = *it; + PortWidget* pw = (type == engine::Port::INPUT) ? cw->outputPort : cw->inputPort; + engine::PortInfo* portInfo = pw->getPortInfo(); + + PortCableItem* item = createMenuItem(" " + portInfo->module->model->name + ": " + portInfo->getName()); + item->color = cw->color; menu->addChild(item); } }