From f69af2944f0f35589f95fb14c88ed8fc26038e28 Mon Sep 17 00:00:00 2001 From: blacksun Date: Wed, 8 Jan 2014 21:06:26 +0000 Subject: [PATCH] bug fix: QET crash when rotate image or text git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2721 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagramcommands.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sources/diagramcommands.cpp b/sources/diagramcommands.cpp index 32a53ac0c..ad1139ce5 100644 --- a/sources/diagramcommands.cpp +++ b/sources/diagramcommands.cpp @@ -656,9 +656,12 @@ RotateElementsCommand::RotateElementsCommand(const QList &elements, c 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(