Check if a path is valid. Should contains at least one object.
--HG-- branch : feature
This commit is contained in:
parent
1a73a1f870
commit
8a5c4a1a37
|
@ -964,7 +964,8 @@ void MainWindow::ToolDetail(bool checked)
|
||||||
void MainWindow::ToolPiecePath(bool checked)
|
void MainWindow::ToolPiecePath(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectAllDrawObjects();
|
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);
|
&MainWindow::ClosedDialogPiecePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,18 +140,21 @@ void DialogPiecePath::ShowDialog(bool click)
|
||||||
{
|
{
|
||||||
if (click == false)
|
if (click == false)
|
||||||
{
|
{
|
||||||
emit ToolTip("");
|
if (CreatePath().CountNodes() > 0)
|
||||||
prepare = true;
|
|
||||||
|
|
||||||
if (not m_showMode)
|
|
||||||
{
|
{
|
||||||
auto visPath = qobject_cast<VisToolPiecePath *>(vis);
|
emit ToolTip("");
|
||||||
SCASSERT(visPath != nullptr);
|
prepare = true;
|
||||||
visPath->SetMode(Mode::Show);
|
|
||||||
visPath->RefreshGeometry();
|
if (not m_showMode)
|
||||||
|
{
|
||||||
|
auto visPath = qobject_cast<VisToolPiecePath *>(vis);
|
||||||
|
SCASSERT(visPath != nullptr);
|
||||||
|
visPath->SetMode(Mode::Show);
|
||||||
|
visPath->RefreshGeometry();
|
||||||
|
}
|
||||||
|
setModal(true);
|
||||||
|
show();
|
||||||
}
|
}
|
||||||
setModal(true);
|
|
||||||
show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user