[qet] [1866] Diagram editor: fixed a text position bug that occurred only when dropping elements onto diagrams .

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


Revision: 1866
Author:   xavier
Date:     2012-05-27 17:18:22 +0200 (Sun, 27 May 2012)
Log Message:
-----------
Diagram editor: fixed a text position bug that occurred only when dropping elements onto diagrams.

Modified Paths:
--------------
    trunk/sources/elementtextitem.cpp
    trunk/sources/elementtextitem.h

Modified: trunk/sources/elementtextitem.cpp
===================================================================
--- trunk/sources/elementtextitem.cpp	2012-05-27 15:18:21 UTC (rev 1865)
+++ trunk/sources/elementtextitem.cpp	2012-05-27 15:18:22 UTC (rev 1866)
@@ -182,6 +182,14 @@
 }
 
 /**
+	Set the font used to render the text item to \a font.
+*/
+void ElementTextItem::setFont(const QFont &font) {
+	DiagramTextItem::setFont(font);
+	adjustItemPosition(1);
+}
+
+/**
 	Cette methode s'assure que la position de l'ElementTextItem est coherente
 	en ajustant :
 		* la transformation de base qui permet de considerer que l'origine

Modified: trunk/sources/elementtextitem.h
===================================================================
--- trunk/sources/elementtextitem.h	2012-05-27 15:18:21 UTC (rev 1865)
+++ trunk/sources/elementtextitem.h	2012-05-27 15:18:22 UTC (rev 1866)
@@ -65,6 +65,7 @@
 	QPointF originalPos() const;
 	void setOriginalRotationAngle(const qreal &);
 	qreal originalRotationAngle() const;
+	virtual void setFont(const QFont &);
 	
 	public slots:
 	void adjustItemPosition(int = 0);


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