Fix Valentina crash.

Valentina crashes if click on curve control point.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-07-25 21:56:01 +03:00
parent 99de6f8e22
commit 4d7d2ac607
2 changed files with 4 additions and 4 deletions

View File

@ -170,10 +170,10 @@ enum class Vis : ToolVisHolderType
{
ControlPointSpline = static_cast<ToolVisHolderType>(Tool::LAST_ONE_DO_NOT_USE),
GraphicsSimpleTextItem,
ScaledLine,
ScaledEllipse,
SimplePoint,
SimpleCurve,
ScaledLine,
ScaledEllipse,
Line,
Path,
Operation,

View File

@ -445,8 +445,8 @@ void VMainGraphicsView::mousePressEvent(QMouseEvent *event)
{
if (this->scene()->items().contains(list.at(i)))
{
if (list.at(i)->type() <= VSimpleCurve::Type &&
list.at(i)->type() > QGraphicsItem::UserType)
if (list.at(i)->type() > QGraphicsItem::UserType &&
list.at(i)->type() <= VSimpleCurve::Type)
{
emit itemClicked(list.at(i));
break;