[qet] [2441] fix Zvalue of graphics items to be upper than DiagramImageItem

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


Revision: 2441
Author:   blacksun
Date:     2013-08-20 19:16:54 +0200 (Tue, 20 Aug 2013)
Log Message:
-----------
fix Zvalue of graphics items to be upper than DiagramImageItem

Modified Paths:
--------------
    branches/0.4/sources/conductor.cpp
    branches/0.4/sources/diagramtextitem.cpp

Modified: branches/0.4/sources/conductor.cpp
===================================================================
--- branches/0.4/sources/conductor.cpp	2013-08-20 14:54:12 UTC (rev 2440)
+++ branches/0.4/sources/conductor.cpp	2013-08-20 17:16:54 UTC (rev 2441)
@@ -46,12 +46,15 @@
 	segments(NULL),
 	moving_point(false),
 	moving_segment(false),
-	previous_z_value(zValue()),
 	modified_path(false),
 	has_to_save_profile(false),
 	segments_squares_scale_(1.0),
 	must_highlight_(Conductor::None)
 {
+	//set Zvalue at 10 to be upper than the DiagramImageItem
+	setZValue(10);
+	previous_z_value = zValue();
+
 	// ajout du conducteur a la liste de conducteurs de chacune des deux bornes
 	bool ajout_p1 = terminal1 -> addConductor(this);
 	bool ajout_p2 = terminal2 -> addConductor(this);

Modified: branches/0.4/sources/diagramtextitem.cpp
===================================================================
--- branches/0.4/sources/diagramtextitem.cpp	2013-08-20 14:54:12 UTC (rev 2440)
+++ branches/0.4/sources/diagramtextitem.cpp	2013-08-20 17:16:54 UTC (rev 2441)
@@ -32,6 +32,8 @@
 	previous_text_(),
 	rotation_angle_(0.0)
 {
+	//set Zvalue at 10 to be upper than the DiagramImageItem
+	setZValue(10);
 	setDefaultTextColor(Qt::black);
 	setFont(QETApp::diagramTextsFont());
 	setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable);
@@ -52,6 +54,8 @@
 	previous_text_(text),
 	rotation_angle_(0.0)
 {
+	//set Zvalue at 10 to be upper than the DiagramImageItem
+	setZValue(10);
 	setDefaultTextColor(Qt::black);
 	setFont(QETApp::diagramTextsFont());
 	setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable);


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