[qet] [2764] Minor improvement 1 : folio report widget, reports aren' t sort if they aren't drop in same order of diagram

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


Revision: 2764
Author:   blacksun
Date:     2014-01-22 21:10:06 +0100 (Wed, 22 Jan 2014)
Log Message:
-----------
Minor improvement 1 : folio report widget, reports aren't sort if they aren't drop in same order of diagram
ex: first are drop in diagram 1, 2 in diag 5, 3 in diag 3 etc...

Minor iprovement 2 : Able to connect folio report in the same folio.

Modified Paths:
--------------
    trunk/sources/ui/folioreportproperties.cpp

Modified: trunk/sources/ui/folioreportproperties.cpp
===================================================================
--- trunk/sources/ui/folioreportproperties.cpp	2014-01-21 20:02:59 UTC (rev 2763)
+++ trunk/sources/ui/folioreportproperties.cpp	2014-01-22 20:10:06 UTC (rev 2764)
@@ -46,10 +46,9 @@
 
 	//Research the invert report of @element_
 	int rep = element_->linkType() == Element::NextReport? Element::PreviousReport : Element::NextReport;
-	ElementProvider ep(element_->diagram()->project(), element_->diagram());
+	ElementProvider ep(element_->diagram()->project());
 	QList <Element *> elmt_list = ep.freeElement(rep);
-	qSort(elmt_list);
-	qDebug() <<elmt_list;
+
 	foreach (Element *elmt, elmt_list) {
 		if (elmt != element_) {
 			//label for the button
@@ -61,7 +60,7 @@
 																		  .arg(elmt->diagram() -> convertPosition(elmt -> scenePos()).toString());
 
 			//button himself
-			QHBoxLayout *hl = new QHBoxLayout(this);
+			QHBoxLayout *hl = new QHBoxLayout();
 			QRadioButton *rb = new QRadioButton(button_text , this);
 			QPushButton *pb = new QPushButton(QET::Icons::ZoomDraw,"",this);
 			hl->addWidget(rb);
@@ -69,8 +68,6 @@
 			hl->addWidget(pb);
 			ui->available_report_layout->addLayout(hl);
 			element_list << elmt;
-			qSort(element_list);
-			qDebug() <<element_list;
 			//map the radio button signal
 			connect(rb, SIGNAL(clicked()), sm_, SLOT(map()));
 			sm_ -> setMapping(rb, element_list.size()-1);


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