Element editor : minor fix

In the part list widget, the terminal name is empty if terminal haven't
got name.
Now "terminal" is always displayed and if the terminal have a name the
name is appended to "terminal".
Example :
if the terminal name is 24 then the the part list widget show "terminal
: 24"
This commit is contained in:
joshua
2024-02-15 22:04:11 +01:00
parent 7fe4765bff
commit ff3b497da2
4 changed files with 16 additions and 8 deletions

View File

@@ -179,10 +179,10 @@ qreal PartTerminal::rotation() const {
}
/**
@brief PartTerminal::setName
@brief PartTerminal::setTerminalName
@param name
*/
void PartTerminal::setName(QString& name) {
void PartTerminal::setTerminalName(const QString& name) {
if (d -> m_name == name) return;
d -> m_name = name;
emit nameChanged();