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;
}
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) {
QGraphicsScene::mousePressEvent(e);
}
- kDebug() << "////// MOUSE CLICK, RESIZE MODE: " << m_resizeMode;
+ kDebug() << "////// MOUSE CLICK, RESIZE MODE: " << m_resizeMode;
}
* 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());