diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 9e41fc96a..552ad63fe 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -2005,6 +2005,10 @@ void QETDiagramEditor::cleanCurrentProject() { } } +void QETDiagramEditor::reloadOldElementPanel() { + pa->reloadAndFilter(); +} + /** * @brief export nomemclature of schema */ diff --git a/sources/qetdiagrameditor.h b/sources/qetdiagrameditor.h index fb516e17d..6a0ae7a18 100644 --- a/sources/qetdiagrameditor.h +++ b/sources/qetdiagrameditor.h @@ -144,6 +144,7 @@ class QETDiagramEditor : public QETMainWindow { void moveDiagramUpx10(Diagram *); void moveDiagramDownx10(Diagram *); void cleanCurrentProject(); + void reloadOldElementPanel(); void nomenclatureProject(); void diagramWasAdded(DiagramView *); void findElementInPanel(const ElementsLocation &); diff --git a/sources/qetmainwindow.cpp b/sources/qetmainwindow.cpp index 196030d67..1e470f8e8 100644 --- a/sources/qetmainwindow.cpp +++ b/sources/qetmainwindow.cpp @@ -24,6 +24,7 @@ #include "qetmainwindow.h" #include "qeticons.h" #include "qetapp.h" +#include "qetdiagrameditor.h" /** Constructor @@ -53,7 +54,13 @@ void QETMainWindow::initCommonActions() { configure_action_ = new QAction(QET::Icons::Configure, tr("&Configurer QElectroTech"), this); configure_action_ -> setStatusTip(tr("Permet de régler différents paramètres de QElectroTech", "status bar tip")); - connect(configure_action_, SIGNAL(triggered()), qet_app, SLOT(configureQET())); + connect(configure_action_, &QAction::triggered, [qet_app]() { + qet_app->configureQET(); + //TODO we use reloadOldElementPanel only to keep up to date the string of the folio in the old element panel. + //then, if user change the option "Use labels of folio instead of their ID" the string of folio in the old element panel is up to date + foreach (QETDiagramEditor *qde, qet_app->diagramEditors()) + qde->reloadOldElementPanel(); + }); fullscreen_action_ = new QAction(this); updateFullScreenAction();