Resolved issue #423. Deny moving several labels at one time.

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2015-12-28 10:00:10 +02:00
parent f69d73eed0
commit 9fd6f18426

View File

@ -30,6 +30,7 @@
#include <QGraphicsSceneMouseEvent> #include <QGraphicsSceneMouseEvent>
#include <QList> #include <QList>
#include <QGraphicsItem> #include <QGraphicsItem>
#include <QApplication>
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
@ -71,6 +72,14 @@ void VMainGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
emit mousePress(event->scenePos()); emit mousePress(event->scenePos());
QGraphicsScene::mousePressEvent(event); QGraphicsScene::mousePressEvent(event);
if (QGuiApplication::keyboardModifiers() == Qt::ControlModifier)
{
QList<QGraphicsItem *> items = selectedItems();
for (int i=0; i< items.size(); i++)
{
items[i]->setSelected(false);
}
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------