element-editor: no warning on save, when element without terminals is frontview (and fix indention)

This commit is contained in:
plc-user
2026-06-16 20:40:08 +02:00
parent ae42198882
commit 482fd32dc2
+4 -2
View File
@@ -736,11 +736,13 @@ bool QETElementEditor::checkElement()
QList<QETWarning> warnings; QList<QETWarning> warnings;
QList<QETWarning> errors; QList<QETWarning> errors;
// Warning #1: Element haven't got terminal // Warning #1: Element does not have (enough) terminals
// (except for report and conductor definition, because they must have one terminal and this checking is done below) // (except for report and conductor definition, because they must have one terminal and this checking is done below)
// (another exception: "thumbnails" aka "front-views" may/should not have terminals)
if (!m_elmt_scene -> containsTerminals() && if (!m_elmt_scene -> containsTerminals() &&
!(m_elmt_scene->elementData().m_type & ElementData::AllReport) && !(m_elmt_scene->elementData().m_type & ElementData::AllReport) &&
m_elmt_scene->elementData().m_type != ElementData::ConductorDefinition) { m_elmt_scene->elementData().m_type != ElementData::ConductorDefinition &&
m_elmt_scene->elementData().m_type != ElementData::Thumbnail) {
warnings << qMakePair( warnings << qMakePair(
tr("Absence de borne", "warning title"), tr("Absence de borne", "warning title"),
tr( tr(