[qet] [4706] 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

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4706
Author:   blacksun
Date:     2016-09-14 15:58:44 +0200 (Wed, 14 Sep 2016)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetdiagrameditor.h
    trunk/sources/qetmainwindow.cpp

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2016-09-14 02:48:17 UTC (rev 4705)
+++ trunk/sources/qetdiagrameditor.cpp	2016-09-14 13:58:44 UTC (rev 4706)
@@ -2005,6 +2005,10 @@
 	}
 }
 
+void QETDiagramEditor::reloadOldElementPanel() {
+	pa->reloadAndFilter();
+}
+
 /**
  * @brief export nomemclature of schema
  */

Modified: trunk/sources/qetdiagrameditor.h
===================================================================
--- trunk/sources/qetdiagrameditor.h	2016-09-14 02:48:17 UTC (rev 4705)
+++ trunk/sources/qetdiagrameditor.h	2016-09-14 13:58:44 UTC (rev 4706)
@@ -144,6 +144,7 @@
 		void moveDiagramUpx10(Diagram *);
 		void moveDiagramDownx10(Diagram *);
 		void cleanCurrentProject();
+		void reloadOldElementPanel();
 		void nomenclatureProject();
 		void diagramWasAdded(DiagramView *);
 		void findElementInPanel(const ElementsLocation &);

Modified: trunk/sources/qetmainwindow.cpp
===================================================================
--- trunk/sources/qetmainwindow.cpp	2016-09-14 02:48:17 UTC (rev 4705)
+++ trunk/sources/qetmainwindow.cpp	2016-09-14 13:58:44 UTC (rev 4706)
@@ -24,6 +24,7 @@
 #include "qetmainwindow.h"
 #include "qeticons.h"
 #include "qetapp.h"
+#include "qetdiagrameditor.h"
 
 /**
 	Constructor
@@ -53,7 +54,13 @@
 	
 	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();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/