Hide options if user click on visualization's objects.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-05-30 13:10:15 +03:00
parent c3d5688f28
commit 5f977c640e

View File

@ -254,11 +254,19 @@ void VMainGraphicsView::mousePressEvent(QMouseEvent *mousePress)
} }
for (int i = 0; i < list.size(); ++i) for (int i = 0; i < list.size(); ++i)
{ {
if (list.at(i)->type() <= VSimpleCurve::Type && list.at(i)->type() > QGraphicsItem::UserType) if (qApp->getCurrentScene()->items().contains(list.at(i)))
{
if (list.at(i)->type() <= VSimpleCurve::Type &&
list.at(i)->type() > QGraphicsItem::UserType)
{ {
emit itemClicked(list.at(i)); emit itemClicked(list.at(i));
break; break;
} }
else
{
emit itemClicked(nullptr);
}
}
} }
} }
break; break;