[qet] [2721] bug fix: QET crash when rotate image or text

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


Revision: 2721
Author:   blacksun
Date:     2014-01-08 22:06:26 +0100 (Wed, 08 Jan 2014)
Log Message:
-----------
bug fix: QET crash when rotate image or text

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

Modified: trunk/sources/diagramcommands.cpp
===================================================================
--- trunk/sources/diagramcommands.cpp	2014-01-08 19:27:38 UTC (rev 2720)
+++ trunk/sources/diagramcommands.cpp	2014-01-08 21:06:26 UTC (rev 2721)
@@ -656,9 +656,12 @@
 	elements_to_rotate(elements),
 	texts_to_rotate(texts),
 	images_to_rotate(images),
-	applied_rotation_angle_(90.0),
-	diagram (elements.first()->diagram())
+	applied_rotation_angle_(90.0)
 {
+	if(elements_to_rotate.size()) diagram = elements_to_rotate.first()->diagram();
+	else if (texts_to_rotate.size()) diagram = texts_to_rotate.first()->diagram();
+	else if (images_to_rotate.size()) diagram = images_to_rotate.first()->diagram();
+
 	setText(
 		QString(
 			QObject::tr(


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