Fix tool True darts notes.

This commit is contained in:
Roman Telezhynskyi 2022-02-05 12:22:49 +02:00
parent f97c18c923
commit 427a70b541
4 changed files with 13 additions and 1 deletions

View File

@ -32,6 +32,7 @@
- Fix infinite loop in tool cut spline. - Fix infinite loop in tool cut spline.
- Added scroll area to layout settings dialog. - Added scroll area to layout settings dialog.
- Allow size to have values from 1 to 100 if not a circumference. - Allow size to have values from 1 to 100 if not a circumference.
- Fix tool True darts notes.
# Valentina 0.7.49 July 1, 2021 # Valentina 0.7.49 July 1, 2021
- Fix crash. - Fix crash.

View File

@ -193,7 +193,7 @@ const QSharedPointer<VGObject> VContainer::GetGObject(quint32 id) const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
const QSharedPointer<VGObject> VContainer::GetFakeGObject(quint32 id) const QSharedPointer<VGObject> VContainer::GetFakeGObject(quint32 id)
{ {
VGObject *obj = new VGObject(); auto *obj = new VGObject();
obj->setId(id); obj->setId(id);
QSharedPointer<VGObject> pointer(obj); QSharedPointer<VGObject> pointer(obj);
return pointer; return pointer;

View File

@ -108,6 +108,15 @@ void VToolDoublePoint::setNameP2(const QString &name)
SetPointName(p2id, name); SetPointName(p2id, name);
} }
//---------------------------------------------------------------------------------------------------------------------
void VToolDoublePoint::SetNotes(const QString &notes)
{
m_notes = notes;
QSharedPointer<VGObject> obj = VContainer::GetFakeGObject(m_id);
SaveOption(obj);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolDoublePoint::GroupVisibility(quint32 object, bool visible) void VToolDoublePoint::GroupVisibility(quint32 object, bool visible)
{ {

View File

@ -61,6 +61,8 @@ public:
QString nameP2() const; QString nameP2() const;
void setNameP2(const QString &name); void setNameP2(const QString &name);
void SetNotes(const QString &notes) override;
virtual void GroupVisibility(quint32 object, bool visible) override; virtual void GroupVisibility(quint32 object, bool visible) override;
virtual void ChangeLabelPosition(quint32 id, const QPointF &pos) override; virtual void ChangeLabelPosition(quint32 id, const QPointF &pos) override;