If both points, start and end, of a line are equal such a line is invalid. To avoid incorrect representation do not draw it.
This commit is contained in:
Roman Telezhynskyi 2020-06-02 16:35:40 +03:00
parent 31db32b2b1
commit 8d68cde576

View File

@ -253,8 +253,12 @@ void Visualization::DrawLine(VScaledLine *lineItem, const QLineF &line, const QC
visPen.setStyle(style);
lineItem->setPen(visPen);
lineItem->setLine(line);
lineItem->setVisible(true);
if (not line.isNull())
{
lineItem->setLine(line);
}
lineItem->setVisible(not line.isNull());
}
//---------------------------------------------------------------------------------------------------------------------