From f9bdc73c2f56016eab42c9e0a14f8531e96c3a53 Mon Sep 17 00:00:00 2001 From: Levi Jetzer Date: Thu, 8 Oct 2026 15:29:05 +0200 Subject: [PATCH] Show all element information fields for terminals Terminal elements only offered eight information fields in the diagram editor (formula, label, comment, designation, manufacturer, manufacturer reference, machine manufacturer reference, supplier). That subset was chosen in faf4235be, before the size, quantity and auxiliary fields existed, so a terminal could not be given a width, height, depth or type. --- sources/qetinformation.cpp | 13 ------------- sources/qetinformation.h | 2 -- sources/ui/elementinfowidget.cpp | 11 ++--------- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/sources/qetinformation.cpp b/sources/qetinformation.cpp index 52cb07983..45461d3aa 100644 --- a/sources/qetinformation.cpp +++ b/sources/qetinformation.cpp @@ -437,16 +437,3 @@ QStringList QETInformation::elementEditorElementInfoKeys() ELMT_UNITY_AUX4 }; return list; } - -QStringList QETInformation::terminalElementInfoKeys() -{ - QStringList list = { ELMT_FORMULA, - ELMT_LABEL, - ELMT_COMMENT, - ELMT_DESIGNATION, - ELMT_MANUFACTURER, - ELMT_MANUFACTURER_REF, - ELMT_MACHINE_MANUFACTURER_REF, - ELMT_SUPPLIER }; - return list; -} diff --git a/sources/qetinformation.h b/sources/qetinformation.h index b0ba1c0a4..26dfb78f2 100644 --- a/sources/qetinformation.h +++ b/sources/qetinformation.h @@ -184,8 +184,6 @@ namespace QETInformation State validate(QString &input, int &pos) const override; }; - QStringList terminalElementInfoKeys(); - QString infoToVar(const QString &info); QString translatedInfoKey(const QString &info); } diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 9cbab800e..0dbd57f76 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -285,12 +285,7 @@ void ElementInfoWidget::disableLiveEdit() */ void ElementInfoWidget::buildInterface() { - QStringList keys; - if (m_element.data()->elementData().m_type == ElementData::Terminal) { - keys = QETInformation::terminalElementInfoKeys(); - } else { - keys = QETInformation::elementInfoKeys(); - } + QStringList keys = QETInformation::elementInfoKeys(); //"exclude_from_bom" is part of elementInfoKeys() because the project //database builds the element_info table from that list, but it is not @@ -354,9 +349,7 @@ void ElementInfoWidget::buildInterface() */ QStringList ElementInfoWidget::predefinedKeys() const { - QStringList keys = (m_element.data()->elementData().m_type == ElementData::Terminal) - ? QETInformation::terminalElementInfoKeys() - : QETInformation::elementInfoKeys(); + QStringList keys = QETInformation::elementInfoKeys(); keys << QETInformation::ELMT_FORMULA_ID << QStringLiteral("auto_num_locked")