Mercurial > hg > svgui
changeset 1435:aa0616116537
Merge
author | Chris Cannam |
---|---|
date | Thu, 21 Mar 2019 15:25:05 +0000 |
parents | ec6605563544 (current diff) 6f51297a0250 (diff) |
children | 18101be79c9c |
files | |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/NoteLayer.cpp Thu Mar 21 15:22:20 2019 +0000 +++ b/layer/NoteLayer.cpp Thu Mar 21 15:25:05 2019 +0000 @@ -57,6 +57,7 @@ m_originalPoint(0, 0.0, 0, 1.f, tr("New Point")), m_editingPoint(0, 0.0, 0, 1.f, tr("New Point")), m_editingCommand(nullptr), + m_editIsOpen(false), m_verticalScale(AutoAlignScale), m_scaleMinimum(0), m_scaleMaximum(0) @@ -777,6 +778,9 @@ if (v->shouldIlluminateLocalFeatures(this, localPos)) { shouldIlluminate = getPointToDrag(v, localPos.x(), localPos.y(), illuminatePoint); + } else if (m_editIsOpen) { + shouldIlluminate = true; + illuminatePoint = m_editingPoint; } paint.save(); @@ -1092,6 +1096,9 @@ dialog->setFrameDuration(note.duration); dialog->setText(note.label); + m_editingPoint = note; + m_editIsOpen = true; + if (dialog->exec() == QDialog::Accepted) { NoteModel::Point newNote = note; @@ -1107,6 +1114,9 @@ finish(command); } + m_editingPoint = 0; + m_editIsOpen = false; + delete dialog; return true; }
--- a/layer/NoteLayer.h Thu Mar 21 15:22:20 2019 +0000 +++ b/layer/NoteLayer.h Thu Mar 21 15:25:05 2019 +0000 @@ -155,6 +155,7 @@ NoteModel::Point m_originalPoint; NoteModel::Point m_editingPoint; NoteModel::EditCommand *m_editingCommand; + bool m_editIsOpen; VerticalScale m_verticalScale; typedef std::set<NoteModel::Point, NoteModel::Point::Comparator> NoteSet;