diff --git a/include/engine/PortInfo.hpp b/include/engine/PortInfo.hpp index c4d1b134..872c0196 100644 --- a/include/engine/PortInfo.hpp +++ b/include/engine/PortInfo.hpp @@ -13,9 +13,13 @@ struct PortInfo { int portId; /** The name of the port, using sentence capitalization. - e.g. "Sine", "Pitch input", "Mode CV" + e.g. "Sine", "Pitch input", "Mode CV". + + Don't use the words "input" or "output" in the name. + Since this text is often prepended or appended to the name, the name will appear as e.g. "Sine input input", "Input: Sine input". */ std::string name; + /** An optional one-sentence description of the parameter. */ std::string description; diff --git a/src/app/PortWidget.cpp b/src/app/PortWidget.cpp index 94a20f59..e9660f2f 100644 --- a/src/app/PortWidget.cpp +++ b/src/app/PortWidget.cpp @@ -23,6 +23,12 @@ struct PortTooltip : ui::Tooltip { text = (portWidget->type == engine::Port::INPUT) ? "Input" : "Output"; text += ": "; text += portInfo->getName(); + // Description + std::string description = portInfo->getDescription(); + if (description != "") { + text += "\n"; + text += description; + } // Voltage, number of channels int channels = port->getChannels(); for (int i = 0; i < channels; i++) { @@ -32,12 +38,6 @@ struct PortTooltip : ui::Tooltip { text += string::f("%d: ", i + 1); text += string::f("% .3fV", port->getVoltage(i)); } - // Description - std::string description = portInfo->getDescription(); - if (description != "") { - text += "\n"; - text += description; - } // Connected to std::list cables = APP->scene->rack->getCablesOnPort(portWidget); for (CableWidget* cable : cables) {