From e46c3d0243e838d08c5ad1a25603d1dbb00dfd8a Mon Sep 17 00:00:00 2001 From: blacksun Date: Wed, 14 Sep 2016 13:58:44 +0000 Subject: [PATCH] Keep up to date the string of folio in the old element panel, when user change the option "Use labels of folio instead of their ID" in the Configure QElectroTech Dialog git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4706 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetdiagrameditor.cpp | 4 ++++ sources/qetdiagrameditor.h | 1 + sources/qetmainwindow.cpp | 9 ++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) 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();