+ } else if (!m_dragGuide) {
+ // check if there is a guide close to mouse click
+ QList<QGraphicsItem *> guidesCollisionList = items(event->pos().x() - 5, event->pos().y(), 10, 2); // a rect of height < 2 does not always collide with the guide
+ for (int i = 0; i < guidesCollisionList.count(); i++) {
+ if (guidesCollisionList.at(i)->type() == GUIDEITEM) {
+ m_dragGuide = static_cast <Guide *>(guidesCollisionList.at(i));
+ break;
+ }
+ }
+ // keep this to support multiple guides context menu in the future (?)
+ /*if (guidesCollisionList.at(0)->type() != GUIDEITEM)
+ guidesCollisionList.removeAt(0);
+ }
+ if (!guidesCollisionList.isEmpty())
+ m_dragGuide = static_cast <Guide *>(guidesCollisionList.at(0));*/