[qet] [3815] dveventaddshape : Minor change related to the calcule of help line

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


Revision: 3815
Author:   blacksun
Date:     2015-03-09 11:16:20 +0100 (Mon, 09 Mar 2015)
Log Message:
-----------
dveventaddshape : Minor change related to the calcule of help line

Modified Paths:
--------------
    trunk/sources/dvevent/dveventaddshape.cpp

Modified: trunk/sources/dvevent/dveventaddshape.cpp
===================================================================
--- trunk/sources/dvevent/dveventaddshape.cpp	2015-03-08 14:02:52 UTC (rev 3814)
+++ trunk/sources/dvevent/dveventaddshape.cpp	2015-03-09 10:16:20 UTC (rev 3815)
@@ -190,20 +190,19 @@
 		pen.setCosmetic(true);
 		pen.setColor(Qt::darkGray);
 
-			//Add +5 for each line, because the topleft of diagram isn't draw at position (0:0) but (5:5)
+		QRectF rect = m_diagram -> drawingRect();
+
 		if (!m_help_horiz)
 		{
-			m_help_horiz = new QGraphicsLineItem(m_diagram -> border_and_titleblock.rowsHeaderWidth() + 5, 0,
-												 m_diagram -> border_and_titleblock.diagramWidth() + 5, 0);
-			m_help_horiz->setPen(pen);
+			m_help_horiz = new QGraphicsLineItem(rect.topLeft().x(), 0, rect.topRight().x(), 0);
+			m_help_horiz -> setPen(pen);
 			m_diagram -> addItem(m_help_horiz);
 		}
 
 		if (!m_help_verti)
 		{
-			m_help_verti = new QGraphicsLineItem(0, m_diagram -> border_and_titleblock.columnsHeaderHeight() + 5,
-												 0, m_diagram -> border_and_titleblock.diagramHeight() + 5);
-			m_help_verti->setPen(pen);
+			m_help_verti = new QGraphicsLineItem(0, rect.topLeft().y(), 0, rect.bottomLeft().y());
+			m_help_verti -> setPen(pen);
 			m_diagram -> addItem(m_help_verti);
 		}
 	}


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