[qet] qet/qet: [5389] minor fix : elements can't be moved up and left, when there rotation are different than 0.

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


Revision: 5389
Author:   blacksun
Date:     2018-06-07 18:29:41 +0200 (Thu, 07 Jun 2018)
Log Message:
-----------
minor fix : elements can't be moved up and left, when there rotation are different than 0.

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

Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp	2018-06-07 13:48:12 UTC (rev 5388)
+++ trunk/sources/diagram.cpp	2018-06-07 16:29:41 UTC (rev 5389)
@@ -310,8 +310,8 @@
 					case Qt::Key_Left:
 						for (Element *item : dc.m_elements)
 						{
-							left_position = item->mapRectFromScene(item->boundingRect()).x();
-							if (left_position >= this->sceneRect().left() - item->boundingRect().width())
+							left_position = item->sceneBoundingRect().x();
+							if(left_position <= 5)
 								return;
 						}
 						movement = QPointF(-xGrid, 0.0);
@@ -322,8 +322,8 @@
 					case Qt::Key_Up:
 						for(Element *item : dc.m_elements)
 						{
-							top_position = item->mapRectFromScene(item->boundingRect()).y();
-							if (top_position >= this->sceneRect().top() - item->boundingRect().height())
+							top_position = item->sceneBoundingRect().y();
+							if(top_position <= 5)
 								return;
 						}
 						movement = QPointF(0.0, -yGrid);


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