[qet] qet/qet: [4779] Minor fix : project panel doesn' t convert the variable %id of folio.

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


Revision: 4779
Author:   blacksun
Date:     2016-11-15 10:23:36 +0100 (Tue, 15 Nov 2016)
Log Message:
-----------
Minor fix : project panel doesn't convert the variable %id of folio.

Modified Paths:
--------------
    trunk/sources/genericpanel.cpp

Modified: trunk/sources/genericpanel.cpp
===================================================================
--- trunk/sources/genericpanel.cpp	2016-11-14 07:12:53 UTC (rev 4778)
+++ trunk/sources/genericpanel.cpp	2016-11-15 09:23:36 UTC (rev 4779)
@@ -285,49 +285,54 @@
 	QSettings settings;
 	
 	QString displayed_title = diagram -> title();
-	if (displayed_title.isEmpty()) {
+	if (displayed_title.isEmpty())
+	{
 		displayed_title = tr("Folio sans titre", "Fallback label when a diagram has no title");
 	}
-	if (settings.value("genericpanel/folio", true).toBool()){
-	QString displayed_label = diagram ->border_and_titleblock.folio();
-	int diagram_folio_idx = diagram -> folioIndex();
-	if (diagram_folio_idx != -1) {
-		displayed_label = QString(
-			tr(
-				"%1 - %2",
-				"label displayed for a diagram in the panel ; %1 is the folio index, %2 is the diagram title"
-			)
-		).arg(displayed_label).arg(displayed_title);
+
+	if (settings.value("genericpanel/folio", true).toBool())
+	{
+		QString displayed_label = diagram ->border_and_titleblock.finalfolio();
+		int diagram_folio_idx = diagram -> folioIndex();
+		if (diagram_folio_idx != -1)
+		{
+			displayed_label = QString(
+						tr(
+							"%1 - %2",
+							"label displayed for a diagram in the panel ; %1 is the folio index, %2 is the diagram title"
+							)
+						).arg(displayed_label).arg(displayed_title);
+			diagram_qtwi -> setText(0, displayed_label);
+		}
+
+	}
+	else
+	{
+		QString displayed_label;
+		int diagram_folio_idx = diagram -> folioIndex();
+		if (diagram_folio_idx != -1)
+		{
+			displayed_label = QString(
+						tr(
+							"%1 - %2",
+							"label displayed for a diagram in the panel ; %1 is the folio index, %2 is the diagram title"
+							)
+						).arg(diagram_folio_idx + 1).arg(displayed_title);
+		}
+
 		diagram_qtwi -> setText(0, displayed_label);
+
 	}
-	
-	}else{
-	QString displayed_label;
-	int diagram_folio_idx = diagram -> folioIndex();
-	if (diagram_folio_idx != -1) {
-		displayed_label = QString(
-			tr(
-				"%1 - %2",
-				"label displayed for a diagram in the panel ; %1 is the folio index, %2 is the diagram title"
-			)
-		).arg(diagram_folio_idx + 1).arg(displayed_title);
-	}
-	
-	diagram_qtwi -> setText(0, displayed_label);
-	
-	}
-	if (freshly_created) {
+	if (freshly_created)
+	{
 		diagram_qtwi -> setData(0, GenericPanel::Item, qVariantFromValue(diagram));
 		diagrams_.insert(diagram, diagram_qtwi);
 		
-		connect(
-			diagram, SIGNAL(diagramTitleChanged(Diagram *, const QString &)),
-			this,    SLOT  (diagramTitleChanged(Diagram *, const QString &))
-		);
+		connect(diagram, &Diagram::diagramTitleChanged, this, &GenericPanel::diagramTitleChanged);
 	}
 	
 	return(updateItem(diagram_qtwi, options, freshly_created));
-	}
+}
 
 
 


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