Fix crash when save notes for the line tool.

(cherry picked from commit 66fc63c04b)
This commit is contained in:
Roman Telezhynskyi 2020-11-13 15:27:06 +02:00
parent 9ae51c937f
commit 1e3f11d1a1
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;