Merged in ValentinaZhuravska/valentina/feature (pull request #87)

Resolved issue #423.

--HG--
branch : develop
This commit is contained in:
Roman Telezhinskyi 2015-12-28 16:03:31 +02:00
commit 6115b02b5b

View File

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