Fix crash while delete the last base point.

Disable removing by key Delete if a base point is the last.
This commit is contained in:
Roman Telezhynskyi 2021-04-08 18:36:51 +03:00
parent 5fcefc0642
commit 17de0410a0

View File

@ -228,6 +228,11 @@ void VToolBasePoint::SetBasePointPos(const QPointF &pos)
//---------------------------------------------------------------------------------------------------------------------
void VToolBasePoint::DeleteToolWithConfirm(bool ask)
{
if (doc->CountPP() <= 1)
{
return;
}
qCDebug(vTool, "Deleting base point.");
emit VAbstractValApplication::VApp()->getSceneView()->itemClicked(nullptr);
if (ask)