diff --git a/src/libs/vwidgets/vmaingraphicsview.cpp b/src/libs/vwidgets/vmaingraphicsview.cpp index 8d85345ba..69239cbbe 100644 --- a/src/libs/vwidgets/vmaingraphicsview.cpp +++ b/src/libs/vwidgets/vmaingraphicsview.cpp @@ -513,9 +513,11 @@ void VMainGraphicsView::mousePressEvent(QMouseEvent *event) emit itemClicked(nullptr); break; } + + const QList 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) {