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

@ -235,11 +235,14 @@ void DialogSplinePath::UpdateList()
void DialogSplinePath::ShowDialog(bool click)
{
if (click == false)
{
if (path.CountPoint() >= 3)
{
emit ToolTip("");
DialogAccepted();
}
}
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSplinePath::PathUpdated(const VSplinePath &path)

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"));
}
}
}