From: <j-...@us...> - 2009-08-31 13:31:05
|
Revision: 3866 http://kdenlive.svn.sourceforge.net/kdenlive/?rev=3866&view=rev Author: j-b-m Date: 2009-08-31 13:30:59 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Fix inverted rectangles in titles Modified Paths: -------------- trunk/kdenlive/src/graphicsscenerectmove.cpp Modified: trunk/kdenlive/src/graphicsscenerectmove.cpp =================================================================== --- trunk/kdenlive/src/graphicsscenerectmove.cpp 2009-08-31 12:14:41 UTC (rev 3865) +++ trunk/kdenlive/src/graphicsscenerectmove.cpp 2009-08-31 13:30:59 UTC (rev 3866) @@ -479,9 +479,11 @@ } QGraphicsScene::mouseMoveEvent(e); } else if (m_tool == TITLE_RECTANGLE && e->buttons() & Qt::LeftButton) { - if (m_selectedItem == NULL && (m_clickPoint - e->screenPos()).manhattanLength() >= QApplication::startDragDistance()) { + if (m_selectedItem == NULL) { // create new rect item - m_selectedItem = addRect(0, 0, e->scenePos().x() - m_sceneClickPoint.x(), e->scenePos().y() - m_sceneClickPoint.y()); + QRectF r(0, 0, e->scenePos().x() - m_sceneClickPoint.x(), e->scenePos().y() - m_sceneClickPoint.y()); + r = r.normalized(); + m_selectedItem = addRect(QRectF(0, 0, r.width(), r.height())); emit newRect((QGraphicsRectItem *) m_selectedItem); m_selectedItem->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); m_selectedItem->setPos(m_sceneClickPoint); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |