mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-18 03:42:36 +02:00
element-editor: no warning on save, when element without terminals is frontview (and fix indention)
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user