Refactoring. Move getting list of scene items from the loop.
--HG-- branch : develop
This commit is contained in:
parent
fc3f8df5b0
commit
194a1878df
|
@ -513,9 +513,11 @@ void VMainGraphicsView::mousePressEvent(QMouseEvent *event)
|
||||||
emit itemClicked(nullptr);
|
emit itemClicked(nullptr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QList<QGraphicsItem *> sceneItems = this->scene()->items();
|
||||||
for (auto item : list)
|
for (auto item : list)
|
||||||
{
|
{
|
||||||
if (this->scene()->items().contains(item))
|
if (sceneItems.contains(item))
|
||||||
{
|
{
|
||||||
if (item->type() > QGraphicsItem::UserType && item->type() <= VSimpleCurve::Type)
|
if (item->type() > QGraphicsItem::UserType && item->type() <= VSimpleCurve::Type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user