diff --git a/sources/diagram.cpp b/sources/diagram.cpp index ae90f16c2..97debbe46 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -94,9 +94,13 @@ Diagram::Diagram(QETProject *project) : pen.setColor(Qt::black); conductor_setter_ -> setPen(pen); - connect(&border_and_titleblock, - &BorderTitleBlock::informationChanged, - this, &Diagram::diagramInformationChanged); + connect(&border_and_titleblock, &BorderTitleBlock::informationChanged, this, [this]() { + for (auto conductor : content().conductors()) { + conductor->refreshText(); + } + emit diagramInformationChanged(); + }); + connect(&border_and_titleblock, &BorderTitleBlock::needTitleBlockTemplate, this, &Diagram::setTitleBlockTemplate); @@ -109,9 +113,6 @@ Diagram::Diagram(QETProject *project) : connect(&border_and_titleblock, &BorderTitleBlock::borderChanged, this, &Diagram::adjustSceneRect); - connect(&border_and_titleblock, - &BorderTitleBlock::titleBlockFolioChanged, - this, &Diagram::updateLabels); connect(this, &Diagram::diagramActivated, this, &Diagram::loadElmtFolioSeq); connect(this, &Diagram::diagramActivated, @@ -1762,19 +1763,6 @@ void Diagram::invertSelection() emit selectionChanged(); } -/** - @brief Diagram::updateLabels - Update elements and conductors that reference folio field - in their labels. -*/ -void Diagram::updateLabels() -{ - for (Conductor *cnd : content().conductors()) - { - cnd->refreshText(); - } -} - /** @brief Diagram::insertFolioSeqHash This class inserts a stringlist containing all diff --git a/sources/diagram.h b/sources/diagram.h index 02b612936..69a172489 100644 --- a/sources/diagram.h +++ b/sources/diagram.h @@ -264,7 +264,6 @@ class Diagram : public QGraphicsScene void titleBlockTemplateRemoved(const QString &, const QString & = QString()); void setTitleBlockTemplate(const QString &); - void updateLabels(); void loadElmtFolioSeq(); void loadCndFolioSeq();