Fix crash when save notes for the line tool.

This commit is contained in:
Roman Telezhynskyi 2020-11-13 15:27:06 +02:00
parent 3c7f565d86
commit 66fc63c04b
3 changed files with 15 additions and 4 deletions

View file

@ -79,8 +79,8 @@ public:
virtual bool IsLabelVisible(quint32 id) const;
QString GetNotes() const;
void SetNotes(const QString &notes);
QString GetNotes() const;
virtual void SetNotes(const QString &notes);
signals:
void ChangedToolSelection(bool selected, quint32 object, quint32 tool);

View file

@ -484,7 +484,7 @@ void VToolLine::SetLineType(const QString &value)
{
m_lineType = value;
QSharedPointer<VGObject> obj;//We don't have object for line in data container. Just will send empty object.
QSharedPointer<VGObject> obj;//We don't have object for line in data container. Just will send an empty object.
SaveOption(obj);
}
@ -499,7 +499,16 @@ void VToolLine::SetLineColor(const QString &value)
{
lineColor = value;
QSharedPointer<VGObject> obj;//We don't have object for line in data container. Just will send empty object.
QSharedPointer<VGObject> obj;//We don't have object for line in data container. Just will send an empty object.
SaveOption(obj);
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLine::SetNotes(const QString &notes)
{
m_notes = notes;
QSharedPointer<VGObject> obj;//We don't have object for line in data container. Just will send an empty object.
SaveOption(obj);
}

View file

@ -85,6 +85,8 @@ public:
QString GetLineColor() const;
void SetLineColor(const QString &value);
virtual void SetNotes(const QString &notes) override;
virtual void ShowVisualization(bool show) override;
virtual void SetLineType(const QString &value) override;