]> git.sesse.net Git - kdenlive/blobdiff - src/graphicsscenerectmove.cpp
Fix a couple of compile warnings because of unused and uninitialized variables.
[kdenlive] / src / graphicsscenerectmove.cpp
index 51c51155b405d156e80c806b990c38502566399e..99f93eeb0a12c5e3dd6bf9bb80e458b05c09aa9d 100644 (file)
@@ -154,14 +154,12 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
     m_resizeMode = NoResize;
     const QList <QGraphicsItem *> list = items(QRectF(p , QSizeF(4, 4)).toRect());
     QGraphicsItem *item = NULL;
-    bool hasSelected = false;
 
     if (m_tool == TITLE_SELECT) {
         foreach(QGraphicsItem *g, list) {
             kDebug() << " - - CHECKING ITEM Z:" << g->zValue() << ", TYPE: " << g->type();
             // check is there is a selected item in list
             if (g->zValue() > -1000 && g->isSelected()) {
-                hasSelected = true;
                 item = g;
                 break;
             }
@@ -186,7 +184,7 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
         if (item != NULL && item->flags() & QGraphicsItem::ItemIsMovable) {
             m_sceneClickPoint = e->scenePos();
             m_selectedItem = item;
-            kDebug() << "/////////  ITEM TYPE: " << item->type();
+            kDebug() << "/////////  ITEM TYPE: " << item->type();
             if (item->type() == 8) {
                 QGraphicsTextItem *t = static_cast<QGraphicsTextItem *>(item);
                 if (t->textInteractionFlags() == Qt::TextEditorInteraction) {
@@ -250,7 +248,7 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
         QGraphicsScene::mousePressEvent(e);
     }
 
-    kDebug() << "//////  MOUSE CLICK, RESIZE MODE: " << m_resizeMode;
+    kDebug() << "//////  MOUSE CLICK, RESIZE MODE: " << m_resizeMode;
 
 }
 
@@ -301,6 +299,7 @@ void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e)
              * inverted)
              */
             int determinantH, determinantV;
+            // Check whether to resize or to just move the item(s)
             switch (m_resizeMode) {
             case TopLeft:
                 determinantV = (bottomRight.x() - newpoint.x()) * (topRight.y() - newpoint.y()) - (bottomRight.y() - newpoint.y()) * (topRight.x() - newpoint.x());