diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 3d9f5c2c7..6a6160e15 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -730,6 +730,9 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document detail.GetGrainlineGeometry().SetLength(qsLength); QString qsRot = GetParametrString(element, VToolDetail::AttrRotation, "90"); detail.GetGrainlineGeometry().SetRotation(qsRot); + VGrainlineGeometry::ArrowType eAT = + VGrainlineGeometry::ArrowType(GetParametrUInt(element, AttrArrows, "0")); + detail.GetGrainlineGeometry().SetArrowType(eAT); } } } diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index 65b00335b..bcc912f3c 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -21,6 +21,7 @@ schema/pattern/v0.3.5.xsd schema/pattern/v0.3.6.xsd schema/pattern/v0.3.7.xsd + schema/pattern/v0.3.8.xsd schema/standard_measurements/v0.3.0.xsd schema/standard_measurements/v0.4.0.xsd schema/standard_measurements/v0.4.1.xsd diff --git a/src/libs/ifc/schema/pattern/v0.3.8.xsd b/src/libs/ifc/schema/pattern/v0.3.8.xsd new file mode 100644 index 000000000..7533631a6 --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.3.8.xsd @@ -0,0 +1,609 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index bade5069f..4246c9091 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -100,6 +100,7 @@ const QString VAbstractPattern::AttrMaterial = QStringLiteral("material") const QString VAbstractPattern::AttrUserDefined = QStringLiteral("userDef"); const QString VAbstractPattern::AttrCutNumber = QStringLiteral("cutNumber"); const QString VAbstractPattern::AttrPlacement = QStringLiteral("placement"); +const QString VAbstractPattern::AttrArrows = QStringLiteral("arrows"); const QString VAbstractPattern::AttrAll = QStringLiteral("all"); diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 9c2ba8003..50aeb8521 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -205,6 +205,7 @@ public: static const QString AttrUserDefined; static const QString AttrCutNumber; static const QString AttrPlacement; + static const QString AttrArrows; static const QString AttrAll; diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 75f592e4d..deff9a092 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -58,8 +58,8 @@ class QDomElement; */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.0"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.3.7"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.3.7.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.3.8"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.3.8.xsd"); //VPatternConverter::PatternMinVer; // <== DON'T FORGET TO UPDATE TOO!!!! //VPatternConverter::PatternMaxVer; // <== DON'T FORGET TO UPDATE TOO!!!! @@ -173,6 +173,8 @@ QString VPatternConverter::XSDSchema(int ver) const case (0x000306): return QStringLiteral("://schema/pattern/v0.3.6.xsd"); case (0x000307): + return QStringLiteral("://schema/pattern/v0.3.7.xsd"); + case (0x000308): return CurrentSchema; default: InvalidVersion(ver); @@ -268,6 +270,10 @@ void VPatternConverter::ApplyPatches() ValidateXML(XSDSchema(0x000307), fileName); V_FALLTHROUGH case (0x000307): + ToV0_3_8(); + ValidateXML(XSDSchema(0x000308), fileName); + V_FALLTHROUGH + case (0x000308): break; default: break; @@ -449,6 +455,13 @@ void VPatternConverter::ToV0_3_7() Save(); } +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::ToV0_3_8() +{ + SetVersion(QStringLiteral("0.3.8")); + Save(); +} + //--------------------------------------------------------------------------------------------------------------------- void VPatternConverter::TagUnitToV0_2_0() { diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index e7fea3f78..267bbbfd5 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -55,10 +55,10 @@ public: // GCC 4.6 doesn't allow constexpr and const together #if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) <= 406 static Q_DECL_CONSTEXPR int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0); - static Q_DECL_CONSTEXPR int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 7); + static Q_DECL_CONSTEXPR int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 8); #else static Q_DECL_CONSTEXPR const int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0); - static Q_DECL_CONSTEXPR const int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 7); + static Q_DECL_CONSTEXPR const int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 8); #endif protected: @@ -96,6 +96,7 @@ private: void ToV0_3_5(); void ToV0_3_6(); void ToV0_3_7(); + void ToV0_3_8(); void TagUnitToV0_2_0(); void TagIncrementToV0_2_0(); diff --git a/src/libs/vlayout/vlayoutdetail.cpp b/src/libs/vlayout/vlayoutdetail.cpp index dc666987f..8aadd1ea3 100644 --- a/src/libs/vlayout/vlayoutdetail.cpp +++ b/src/libs/vlayout/vlayoutdetail.cpp @@ -220,26 +220,33 @@ void VLayoutDetail::SetGrainline(const VGrainlineGeometry& geom, const VContaine v << pt1; - pt.setX(pt1.x() + dArrowLen * qCos(dAng + dArrowAng)); - pt.setY(pt1.y() - dArrowLen * qSin(dAng + dArrowAng)); - v << pt; - pt.setX(pt1.x() + dArrowLen * qCos(dAng - dArrowAng)); - pt.setY(pt1.y() - dArrowLen * qSin(dAng - dArrowAng)); - v << pt; + if (geom.GetArrowType() != VGrainlineGeometry::atRear) { + pt.setX(pt1.x() + dArrowLen * qCos(dAng + dArrowAng)); + pt.setY(pt1.y() - dArrowLen * qSin(dAng + dArrowAng)); + v << pt; + pt.setX(pt1.x() + dArrowLen * qCos(dAng - dArrowAng)); + pt.setY(pt1.y() - dArrowLen * qSin(dAng - dArrowAng)); + v << pt; - v << pt1 << pt2; - - dAng += M_PI; - - pt.setX(pt2.x() + dArrowLen * qCos(dAng + dArrowAng)); - pt.setY(pt2.y() - dArrowLen * qSin(dAng + dArrowAng)); - v << pt; - pt.setX(pt2.x() + dArrowLen * qCos(dAng - dArrowAng)); - pt.setY(pt2.y() - dArrowLen * qSin(dAng - dArrowAng)); - v << pt; + v << pt1; + } v << pt2; + if (geom.GetArrowType() != VGrainlineGeometry::atFront) + { + dAng += M_PI; + + pt.setX(pt2.x() + dArrowLen * qCos(dAng + dArrowAng)); + pt.setY(pt2.y() - dArrowLen * qSin(dAng + dArrowAng)); + v << pt; + pt.setX(pt2.x() + dArrowLen * qCos(dAng - dArrowAng)); + pt.setY(pt2.y() - dArrowLen * qSin(dAng - dArrowAng)); + v << pt; + + v << pt2; + } + d->grainlinePoints = RoundPoints(v); } @@ -739,7 +746,7 @@ QGraphicsItem *VLayoutDetail::GetItem() const //--------------------------------------------------------------------------------------------------------------------- QGraphicsItem* VLayoutDetail::GetGrainlineItem() const { - if (d->grainlinePoints.count() < 6) + if (d->grainlinePoints.count() < 2) { return 0; } diff --git a/src/libs/vpatterndb/vgrainlinegeometry.cpp b/src/libs/vpatterndb/vgrainlinegeometry.cpp index 336d5da76..da8f32a90 100644 --- a/src/libs/vpatterndb/vgrainlinegeometry.cpp +++ b/src/libs/vpatterndb/vgrainlinegeometry.cpp @@ -33,7 +33,7 @@ //--------------------------------------------------------------------------------------------------------------------- VGrainlineGeometry::VGrainlineGeometry() - :m_ptPos(0, 0), m_qsLength(), m_qsRotation(), m_bVisible(false) + :m_ptPos(0, 0), m_qsLength(), m_qsRotation(), m_bVisible(false), m_eArrowType(atBoth) {} //--------------------------------------------------------------------------------------------------------------------- @@ -99,3 +99,17 @@ void VGrainlineGeometry::SetVisible(bool bVisible) //--------------------------------------------------------------------------------------------------------------------- +VGrainlineGeometry::ArrowType VGrainlineGeometry::GetArrowType() const +{ + return m_eArrowType; +} + +//--------------------------------------------------------------------------------------------------------------------- + +void VGrainlineGeometry::SetArrowType(ArrowType eAT) +{ + m_eArrowType = eAT; +} + +//--------------------------------------------------------------------------------------------------------------------- + diff --git a/src/libs/vpatterndb/vgrainlinegeometry.h b/src/libs/vpatterndb/vgrainlinegeometry.h index 0b27c3adf..f556331db 100644 --- a/src/libs/vpatterndb/vgrainlinegeometry.h +++ b/src/libs/vpatterndb/vgrainlinegeometry.h @@ -40,6 +40,15 @@ class QPointF; */ class VGrainlineGeometry { +public: + // denotes the type of arrow for the grainline + enum ArrowType + { + atBoth, + atFront, + atRear + }; + public: VGrainlineGeometry(); ~VGrainlineGeometry(); @@ -53,6 +62,8 @@ public: void SetRotation(const QString& qsRot); bool IsVisible() const; void SetVisible(bool bVisible); + ArrowType GetArrowType() const; + void SetArrowType(ArrowType eAT); private: /** @@ -71,6 +82,10 @@ private: * @brief m_bVisible visibility flag */ bool m_bVisible; + /** + * @brief m_eArrowType type of arrow on the grainline + */ + ArrowType m_eArrowType; }; #endif // VGRAINLINEGEOMETRY_H diff --git a/src/libs/vtools/dialogs/tools/dialogdetail.cpp b/src/libs/vtools/dialogs/tools/dialogdetail.cpp index 189c4ea7d..6b0a6333c 100644 --- a/src/libs/vtools/dialogs/tools/dialogdetail.cpp +++ b/src/libs/vtools/dialogs/tools/dialogdetail.cpp @@ -168,6 +168,10 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge SetAddMode(); EnableGrainlineRotation(); + ui.comboBoxArrow->addItem(tr("Both")); + ui.comboBoxArrow->addItem(tr("Just front")); + ui.comboBoxArrow->addItem(tr("Just rear")); + ui.tabWidget->setCurrentIndex(0); m_iRotBaseHeight = ui.lineEditRotFormula->height(); @@ -486,6 +490,9 @@ VDetail DialogDetail::CreateDetail() const detail.GetGrainlineGeometry().SetVisible(ui.checkBoxGrainline->isChecked()); detail.GetGrainlineGeometry().SetRotation(ui.lineEditRotFormula->toPlainText()); detail.GetGrainlineGeometry().SetLength(ui.lineEditLenFormula->toPlainText()); + VGrainlineGeometry::ArrowType eAT = VGrainlineGeometry::ArrowType(ui.comboBoxArrow->currentIndex()); + detail.GetGrainlineGeometry().SetArrowType(eAT); + return detail; } @@ -559,6 +566,7 @@ void DialogDetail::setDetail(const VDetail &value) ui.checkBoxGrainline->setChecked(detail.GetGrainlineGeometry().IsVisible()); ui.lineEditRotFormula->setPlainText(detail.GetGrainlineGeometry().GetRotation()); ui.lineEditLenFormula->setPlainText(detail.GetGrainlineGeometry().GetLength()); + ui.comboBoxArrow->setCurrentIndex(int(detail.GetGrainlineGeometry().GetArrowType())); m_oldData = detail.GetPatternPieceData(); m_oldGeom = detail.GetPatternInfo(); diff --git a/src/libs/vtools/dialogs/tools/dialogdetail.ui b/src/libs/vtools/dialogs/tools/dialogdetail.ui index 9adf0b18d..7198fcea0 100644 --- a/src/libs/vtools/dialogs/tools/dialogdetail.ui +++ b/src/libs/vtools/dialogs/tools/dialogdetail.ui @@ -966,6 +966,84 @@ + + + + 10 + 260 + 541 + 41 + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + + + 159 + 158 + 158 + + + + + + + + Arrows: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/src/libs/vtools/tools/vgrainlineitem.cpp b/src/libs/vtools/tools/vgrainlineitem.cpp index ff4ae9bed..48b8fc9bd 100644 --- a/src/libs/vtools/tools/vgrainlineitem.cpp +++ b/src/libs/vtools/tools/vgrainlineitem.cpp @@ -54,7 +54,7 @@ VGrainlineItem::VGrainlineItem(QGraphicsItem* pParent) :QGraphicsObject(pParent), m_eMode(VGrainlineItem::mNormal), m_bReleased(false), m_dRotation(0), m_dStartRotation(0), m_dLength(0), m_rectBoundingBox(), m_polyBound(), m_ptStartPos(), m_ptStartMove(), m_dScale(1), m_polyResize(), - m_ptStart(), m_ptFinish(), m_ptCenter(), m_dAngle(0) + m_ptStart(), m_ptFinish(), m_ptCenter(), m_dAngle(0), m_eArrowType(VGrainlineGeometry::atBoth) { m_rectBoundingBox.setTopLeft(QPointF(0, 0)); setAcceptHoverEvents(true); @@ -93,29 +93,35 @@ void VGrainlineItem::paint(QPainter* pP, const QStyleOptionGraphicsItem* pOption // line pP->drawLine(pt1, pt2); - // first arrow + pP->setBrush(clr); QPolygonF poly; - poly << pt1; QPointF ptA; qreal dArrLen = ARROW_LENGTH*m_dScale; - ptA.setX(pt1.x() + dArrLen*cos(m_dRotation + ARROW_ANGLE)); - ptA.setY(pt1.y() - dArrLen*sin(m_dRotation + ARROW_ANGLE)); - poly << ptA; - ptA.setX(pt1.x() + dArrLen*cos(m_dRotation - ARROW_ANGLE)); - ptA.setY(pt1.y() - dArrLen*sin(m_dRotation - ARROW_ANGLE)); - poly << ptA; - pP->setBrush(clr); - pP->drawPolygon(poly); - // second arrow - poly.clear(); - poly << pt2; - ptA.setX(pt2.x() + dArrLen*cos(M_PI + m_dRotation + ARROW_ANGLE)); - ptA.setY(pt2.y() - dArrLen*sin(M_PI + m_dRotation + ARROW_ANGLE)); - poly << ptA; - ptA.setX(pt2.x() + dArrLen*cos(M_PI + m_dRotation - ARROW_ANGLE)); - ptA.setY(pt2.y() - dArrLen*sin(M_PI + m_dRotation - ARROW_ANGLE)); - poly << ptA; - pP->drawPolygon(poly); + if (m_eArrowType != VGrainlineGeometry::atRear) + { + // first arrow + poly << pt1; + ptA.setX(pt1.x() + dArrLen*cos(m_dRotation + ARROW_ANGLE)); + ptA.setY(pt1.y() - dArrLen*sin(m_dRotation + ARROW_ANGLE)); + poly << ptA; + ptA.setX(pt1.x() + dArrLen*cos(m_dRotation - ARROW_ANGLE)); + ptA.setY(pt1.y() - dArrLen*sin(m_dRotation - ARROW_ANGLE)); + poly << ptA; + pP->drawPolygon(poly); + } + if (m_eArrowType != VGrainlineGeometry::atFront) + { + // second arrow + poly.clear(); + poly << pt2; + ptA.setX(pt2.x() + dArrLen*cos(M_PI + m_dRotation + ARROW_ANGLE)); + ptA.setY(pt2.y() - dArrLen*sin(M_PI + m_dRotation + ARROW_ANGLE)); + poly << ptA; + ptA.setX(pt2.x() + dArrLen*cos(M_PI + m_dRotation - ARROW_ANGLE)); + ptA.setY(pt2.y() - dArrLen*sin(M_PI + m_dRotation - ARROW_ANGLE)); + poly << ptA; + pP->drawPolygon(poly); + } if (m_eMode != mNormal) { @@ -171,7 +177,8 @@ void VGrainlineItem::paint(QPainter* pP, const QStyleOptionGraphicsItem* pOption * @param dRotation rotation of the grainline in [degrees] * @param dLength length of the grainline in user's units */ -void VGrainlineItem::UpdateGeometry(const QPointF& ptPos, qreal dRotation, qreal dLength) +void VGrainlineItem::UpdateGeometry(const QPointF& ptPos, qreal dRotation, qreal dLength, + VGrainlineGeometry::ArrowType eAT) { m_dRotation = qDegreesToRadians(dRotation); m_dLength = dLength; @@ -185,6 +192,8 @@ void VGrainlineItem::UpdateGeometry(const QPointF& ptPos, qreal dRotation, qreal pt.setY(pt.y() + dY); } setPos(pt); + m_eArrowType = eAT; + UpdateRectangle(); UpdateBox(); } diff --git a/src/libs/vtools/tools/vgrainlineitem.h b/src/libs/vtools/tools/vgrainlineitem.h index 30b4f36c6..41ea59eb5 100644 --- a/src/libs/vtools/tools/vgrainlineitem.h +++ b/src/libs/vtools/tools/vgrainlineitem.h @@ -54,7 +54,8 @@ public: virtual ~VGrainlineItem(); void paint(QPainter* pP, const QStyleOptionGraphicsItem* pOption, QWidget* pWidget); - void UpdateGeometry(const QPointF& ptPos, qreal dRotation, qreal dLength); + void UpdateGeometry(const QPointF& ptPos, qreal dRotation, qreal dLength, + VGrainlineGeometry::ArrowType eAT); QRectF boundingRect() const; void Reset(); @@ -79,23 +80,24 @@ signals: void SignalRotated(qreal dRot, const QPointF& ptNewPos); private: - Mode m_eMode; - bool m_bReleased; - qreal m_dRotation; - qreal m_dStartRotation; - qreal m_dLength; - QRectF m_rectBoundingBox; - QPolygonF m_polyBound; - QPointF m_ptStartPos; - QPointF m_ptStartMove; - qreal m_dScale; - QPolygonF m_polyResize; - qreal m_dStartLength; - QPointF m_ptStart; - QPointF m_ptFinish; - QPointF m_ptCenter; - QPointF m_ptRotCenter; - qreal m_dAngle; + Mode m_eMode; + bool m_bReleased; + qreal m_dRotation; + qreal m_dStartRotation; + qreal m_dLength; + QRectF m_rectBoundingBox; + QPolygonF m_polyBound; + QPointF m_ptStartPos; + QPointF m_ptStartMove; + qreal m_dScale; + QPolygonF m_polyResize; + qreal m_dStartLength; + QPointF m_ptStart; + QPointF m_ptFinish; + QPointF m_ptCenter; + QPointF m_ptRotCenter; + qreal m_dAngle; + VGrainlineGeometry::ArrowType m_eArrowType; }; #endif // VGRAINLINEITEM_H diff --git a/src/libs/vtools/tools/vtooldetail.cpp b/src/libs/vtools/tools/vtooldetail.cpp index f3579fcc8..912f81f7e 100644 --- a/src/libs/vtools/tools/vtooldetail.cpp +++ b/src/libs/vtools/tools/vtooldetail.cpp @@ -509,6 +509,7 @@ void VToolDetail::AddToFile() doc->SetAttribute(domData, AttrMy, glGeom.GetPos().y()); doc->SetAttribute(domData, AttrLength, glGeom.GetLength()); doc->SetAttribute(domData, AttrRotation, glGeom.GetRotation()); + doc->SetAttribute(domData, VAbstractPattern::AttrArrows, int(glGeom.GetArrowType())); qDebug() << "XML ROTATION" << glGeom.GetRotation(); // nodes @@ -588,7 +589,7 @@ void VToolDetail::RefreshDataInFile() doc->SetAttribute(domData, AttrMy, glGeom.GetPos().y()); doc->SetAttribute(domData, AttrLength, glGeom.GetLength()); doc->SetAttribute(domData, AttrRotation, glGeom.GetRotation()); - qDebug() << "XML ROTATION2" << glGeom.GetRotation(); + doc->SetAttribute(domData, VAbstractPattern::AttrArrows, int(glGeom.GetArrowType())); // nodes for (int i = 0; i < det.CountNode(); ++i) @@ -950,7 +951,8 @@ void VToolDetail::UpdateGrainline() return; } - grainLine->UpdateGeometry(geom.GetPos(), dRotation, ToPixel(dLength, *VDataTool::data.GetPatternUnit())); + grainLine->UpdateGeometry(geom.GetPos(), dRotation, ToPixel(dLength, *VDataTool::data.GetPatternUnit()), + geom.GetArrowType()); grainLine->show(); } else diff --git a/src/libs/vtools/undocommands/savedetailoptions.cpp b/src/libs/vtools/undocommands/savedetailoptions.cpp index 5cc0c525d..032db725e 100644 --- a/src/libs/vtools/undocommands/savedetailoptions.cpp +++ b/src/libs/vtools/undocommands/savedetailoptions.cpp @@ -210,6 +210,7 @@ void SaveDetailOptions::SaveGrainline(QDomElement &domElement, const VDetail &de doc->SetAttribute(domData, AttrMy, glGeom.GetPos().y()); doc->SetAttribute(domData, AttrLength, glGeom.GetLength()); doc->SetAttribute(domData, VToolDetail::AttrRotation, glGeom.GetRotation()); + doc->SetAttribute(domData, VAbstractPattern::AttrArrows, int(glGeom.GetArrowType())); domElement.appendChild(domData); }