Resolved issue #423. Deny moving several labels at one time.
--HG-- branch : feature
This commit is contained in:
parent
f69d73eed0
commit
9fd6f18426
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user