Keep the terminal number out of the element properties

The properties window builds a row for every element info key, so it
also offered an editable "Terminal number" row -- both for one element
and for several at once. The number is not a property of the element
but derived from its label: typing there stored a value nothing reads,
and the export has no column for it either (previous commit).

Both windows skip the key now, the way they skip exclude_from_bom.
The key itself stays an element info key, so the element editor keeps
offering %{terminal_number} as a text variable.

The test builds both windows for a terminal of the fixture and looks
at the rows they offer.
This commit is contained in:
Kellermorph
2026-10-23 13:21:29 +02:00
parent f6be424cad
commit 129648f92a
3 changed files with 51 additions and 0 deletions
+7
View File
@@ -313,6 +313,13 @@ void ElementInfoWidget::buildInterface()
//line that currentInfo() then fills with "true"/"false".
keys.removeAll(QStringLiteral("exclude_from_bom"));
//The terminal number is not a property of the element: it is
//derived from its label, so an edit row here would store a value
//nothing reads -- and the nomenclature query has no such column,
//which is why the export does not offer it either. The number
//stays a text variable (%{terminal_number}) of the element editor.
keys.removeAll(QETInformation::ELMT_TERMINAL_NUMBER);
for (auto str : keys)
{
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETInformation::translatedInfoKey(str), this);