Curved path should have three or more points.

--HG--
branch : develop
This commit is contained in:
dismine 2014-11-21 19:24:16 +02:00
parent ffed353147
commit 22f52e4101
2 changed files with 14 additions and 3 deletions

View File

@ -236,8 +236,11 @@ void DialogSplinePath::ShowDialog(bool click)
{
if (click == false)
{
emit ToolTip("");
DialogAccepted();
if (path.CountPoint() >= 3)
{
emit ToolTip("");
DialogAccepted();
}
}
}

View File

@ -82,7 +82,15 @@ void VisToolSplinePath::RefreshGeometry()
DrawPath(this, path.GetPath(PathDirection::Show), mainColor, Qt::SolidLine, Qt::RoundCap);
}
Visualization::toolTip = QString(tr("<b>Curve path</b>: <b>Enter</b> - finish creation"));
if (path.CountPoint() < 3)
{
Visualization::toolTip = QString(tr("<b>Curve path</b>: select three or more points"));
}
else
{
Visualization::toolTip = QString(tr("<b>Curve path</b>: select three or more points, "
"<b>Enter</b> - finish creation"));
}
}
}