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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -140,18 +140,21 @@ void DialogPiecePath::ShowDialog(bool click)
|
|||
{
|
||||
if (click == false)
|
||||
{
|
||||
emit ToolTip("");
|
||||
prepare = true;
|
||||
|
||||
if (not m_showMode)
|
||||
if (CreatePath().CountNodes() > 0)
|
||||
{
|
||||
auto visPath = qobject_cast<VisToolPiecePath *>(vis);
|
||||
SCASSERT(visPath != nullptr);
|
||||
visPath->SetMode(Mode::Show);
|
||||
visPath->RefreshGeometry();
|
||||
emit ToolTip("");
|
||||
prepare = true;
|
||||
|
||||
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