Commits

Anonymous committed bf992ae
  • Participants
  • Parent commits b378528

Comments (0)

Files changed (2)

File src/graphicsscenerectmove.cpp

     case Qt::Key_Delete:
     case Qt::Key_Backspace:
         foreach (QGraphicsItem *qgi, selectedItems()) {
-            removeItem(qgi);
-            delete qgi;
+	    if (qgi->data(-1).toInt() == -1) continue;
+	    removeItem(qgi);
+	    delete qgi;
         }
         m_selectedItem = NULL;
         emit selectionChanged();

File src/titlewidget.cpp

     kDebug() << "// TITLE WIDGWT: " << graphicsView->viewport()->width() << "x" << graphicsView->viewport()->height();
     //toolBox->setItemEnabled(2, false);
     m_startViewport = new QGraphicsRectItem(QRectF(0, 0, m_frameWidth, m_frameHeight));
+    // Setting data at -1 so that the item is recognized as undeletable by graphicsscenerectmove
+    m_startViewport->setData(-1, -1);
     m_endViewport = new QGraphicsRectItem(QRectF(0, 0, m_frameWidth, m_frameHeight));
+    m_endViewport->setData(-1, -1);
     m_startViewport->setData(0, m_frameWidth);
     m_startViewport->setData(1, m_frameHeight);
     m_endViewport->setData(0, m_frameWidth);