From 9fd6f18426c39157f423785047131703802ee2fa Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Mon, 28 Dec 2015 10:00:10 +0200 Subject: [PATCH] Resolved issue #423. Deny moving several labels at one time. --HG-- branch : feature --- src/libs/vwidgets/vmaingraphicsscene.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libs/vwidgets/vmaingraphicsscene.cpp b/src/libs/vwidgets/vmaingraphicsscene.cpp index ad84b48ec..8a3e3f194 100644 --- a/src/libs/vwidgets/vmaingraphicsscene.cpp +++ b/src/libs/vwidgets/vmaingraphicsscene.cpp @@ -30,6 +30,7 @@ #include #include #include +#include //--------------------------------------------------------------------------------------------------------------------- /** @@ -71,6 +72,14 @@ void VMainGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event) { emit mousePress(event->scenePos()); QGraphicsScene::mousePressEvent(event); + if (QGuiApplication::keyboardModifiers() == Qt::ControlModifier) + { + QList items = selectedItems(); + for (int i=0; i< items.size(); i++) + { + items[i]->setSelected(false); + } + } } //---------------------------------------------------------------------------------------------------------------------