Refactoring. Move getting list of scene items from the loop.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-05-08 11:33:53 +03:00
parent fc3f8df5b0
commit 194a1878df

View File

@ -513,9 +513,11 @@ void VMainGraphicsView::mousePressEvent(QMouseEvent *event)
emit itemClicked(nullptr);
break;
}
const QList<QGraphicsItem *> sceneItems = this->scene()->items();
for (auto item : list)
{
if (this->scene()->items().contains(item))
if (sceneItems.contains(item))
{
if (item->type() > QGraphicsItem::UserType && item->type() <= VSimpleCurve::Type)
{