From 61a509e5d89fe7ad798e83e141aae3853f37dc07 Mon Sep 17 00:00:00 2001 From: ispyisail Date: Thu, 13 Aug 2026 21:24:50 +1200 Subject: [PATCH] Fix nameless "false" row in the element Informations panel "exclude_from_bom" is listed in QETInformation::elementInfoKeys() so the project database can build the element_info table column for it, but it is not a free-text property: ElementInfoWidget already gives it its own "Exclure de la nomenclature" check box. Because buildInterface() creates one ElementInfoPartWidget per key in that list, the key also got a second, generic edit row. And since translatedInfoKey() has no case for it and falls through to "return QString()", that row carries no label at all - an anonymous edit line at the bottom of the panel. currentInfo() then writes exclude_from_bom unconditionally, so as soon as the user edits anything the nameless row fills with "true"/"false". Drop the key from the list buildInterface() iterates. The check box remains the only way to set it, currentInfo() still writes it exactly as before, elementInfoKeys() is untouched so the database schema and elementquerywidget are unaffected, and predefinedKeys() already excluded it from the custom-property rows. Reported by plc-user on #642. --- sources/ui/elementinfowidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 0b8a41111..521aa292c 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -204,6 +204,14 @@ void ElementInfoWidget::buildInterface() 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 + //a free-text property: it already has its own check box below. Without + //this it also gets a generic edit row, and since translatedInfoKey() + //has no entry for it that row carries no label at all - an anonymous + //line that currentInfo() then fills with "true"/"false". + keys.removeAll(QStringLiteral("exclude_from_bom")); + for (auto str : keys) { ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETInformation::translatedInfoKey(str), this);