Check if a path is valid. Should contains at least one object.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-11-23 18:50:52 +02:00
parent 1a73a1f870
commit 8a5c4a1a37
2 changed files with 15 additions and 11 deletions

View File

@ -964,7 +964,8 @@ void MainWindow::ToolDetail(bool checked)
void MainWindow::ToolPiecePath(bool checked)
{
ToolSelectAllDrawObjects();
SetToolButton<DialogPiecePath>(checked, Tool::PiecePath, "://cursor/path_cursor.png", tr("Select path objects."),
SetToolButton<DialogPiecePath>(checked, Tool::PiecePath, "://cursor/path_cursor.png",
tr("Select path objects, <b>Shift</b> - reverse direction curve"),
&MainWindow::ClosedDialogPiecePath);
}

View File

@ -139,6 +139,8 @@ void DialogPiecePath::ChosenObject(quint32 id, const SceneObject &type)
void DialogPiecePath::ShowDialog(bool click)
{
if (click == false)
{
if (CreatePath().CountNodes() > 0)
{
emit ToolTip("");
prepare = true;
@ -154,6 +156,7 @@ void DialogPiecePath::ShowDialog(bool click)
show();
}
}
}
//---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::SaveData()