Fix internal path support of pen style.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-05-16 13:47:36 +03:00
parent 32a16890a7
commit 13a93ef5df
4 changed files with 4 additions and 8 deletions

View File

@ -370,7 +370,7 @@
<xs:attribute name="idTool" type="xs:unsignedInt"/> <xs:attribute name="idTool" type="xs:unsignedInt"/>
<xs:attribute name="inUse" type="xs:boolean"/> <xs:attribute name="inUse" type="xs:boolean"/>
<xs:attribute name="name" type="xs:string"/> <xs:attribute name="name" type="xs:string"/>
<xs:attribute name="typeLine" type="xs:string"/> <xs:attribute name="typeLine" type="curvePenStyle"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="tools" minOccurs="0" maxOccurs="unbounded"> <xs:element name="tools" minOccurs="0" maxOccurs="unbounded">

View File

@ -354,11 +354,7 @@ QPainterPath VPiecePath::PainterPath(const VContainer *data) const
if (not points.isEmpty()) if (not points.isEmpty())
{ {
path.moveTo(points.at(0)); path.addPolygon(QPolygonF(points));
for (qint32 i = 1; i < points.count(); ++i)
{
path.lineTo(points.at(i));
}
path.setFillRule(Qt::WindingFill); path.setFillRule(Qt::WindingFill);
} }

View File

@ -703,7 +703,7 @@ void DialogPiecePath::InitPathTab()
ui->lineEditName->setClearButtonEnabled(true); ui->lineEditName->setClearButtonEnabled(true);
#endif #endif
FillComboBoxTypeLine(ui->comboBoxPenType, LineStylesPics()); FillComboBoxTypeLine(ui->comboBoxPenType, CurvePenStylesPics());
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogPiecePath::NameChanged); connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogPiecePath::NameChanged);

View File

@ -49,7 +49,7 @@ void VisToolPiecePath::RefreshGeometry()
if (m_path.CountNodes() > 0) if (m_path.CountNodes() > 0)
{ {
DrawPath(this, m_path.PainterPath(Visualization::data), mainColor, Qt::SolidLine, Qt::RoundCap); DrawPath(this, m_path.PainterPath(Visualization::data), mainColor, m_path.GetPenType(), Qt::RoundCap);
const QVector<VPointF> nodes = m_path.PathNodePoints(Visualization::data); const QVector<VPointF> nodes = m_path.PathNodePoints(Visualization::data);