From ab24b74c7210d22e090ea266f1c127c083ea863e Mon Sep 17 00:00:00 2001 From: Laurent Trinques Date: Thu, 2 Apr 2026 15:46:56 +0200 Subject: [PATCH] Now, elementproperties widget: add MAX contact slave, and count slave contacts linked to this master, show these informations only when element type is master. --- sources/ui/elementpropertieswidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp index 9f6224b38..aeffec783 100644 --- a/sources/ui/elementpropertieswidget.cpp +++ b/sources/ui/elementpropertieswidget.cpp @@ -372,8 +372,10 @@ QWidget *ElementPropertiesWidget::generalWidget() description_string += QString(tr("Rotation : %1°\n")).arg(m_element.data()->rotation()); description_string += QString(tr("Dimensions : %1*%2\n")).arg(m_element -> size().width()).arg(m_element -> size().height()); description_string += QString(tr("Bornes : %1\n")).arg(m_element -> terminals().count()); - description_string += QString(tr("Nombre maximum de contact esclaves défini : %1\n")).arg(m_element -> elementData().m_max_slaves); + if (m_element->linkType() == Element::Master){ + description_string += QString(tr("Nombre maximum de contacts esclaves défini : %1\n")).arg(m_element -> elementData().m_max_slaves); description_string += QString(tr("Nombre de conctact esclaves utilisés : %1\n")).arg(m_element ->linkedElements().count()); + } description_string += QString(tr("Emplacement : %1\n")).arg(m_element.data()->location().toString()); // widget himself