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
This commit is contained in:
blacksun
2016-09-14 13:58:44 +00:00
parent 6ac887fdf4
commit e46c3d0243
3 changed files with 13 additions and 1 deletions

View File

@@ -2005,6 +2005,10 @@ void QETDiagramEditor::cleanCurrentProject() {
} }
} }
void QETDiagramEditor::reloadOldElementPanel() {
pa->reloadAndFilter();
}
/** /**
* @brief export nomemclature of schema * @brief export nomemclature of schema
*/ */

View File

@@ -144,6 +144,7 @@ class QETDiagramEditor : public QETMainWindow {
void moveDiagramUpx10(Diagram *); void moveDiagramUpx10(Diagram *);
void moveDiagramDownx10(Diagram *); void moveDiagramDownx10(Diagram *);
void cleanCurrentProject(); void cleanCurrentProject();
void reloadOldElementPanel();
void nomenclatureProject(); void nomenclatureProject();
void diagramWasAdded(DiagramView *); void diagramWasAdded(DiagramView *);
void findElementInPanel(const ElementsLocation &); void findElementInPanel(const ElementsLocation &);

View File

@@ -24,6 +24,7 @@
#include "qetmainwindow.h" #include "qetmainwindow.h"
#include "qeticons.h" #include "qeticons.h"
#include "qetapp.h" #include "qetapp.h"
#include "qetdiagrameditor.h"
/** /**
Constructor Constructor
@@ -53,7 +54,13 @@ void QETMainWindow::initCommonActions() {
configure_action_ = new QAction(QET::Icons::Configure, tr("&Configurer QElectroTech"), this); 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")); 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); fullscreen_action_ = new QAction(this);
updateFullScreenAction(); updateFullScreenAction();