# HG changeset patch # User Chris Cannam # Date 1553181905 0 # Node ID aa061611653718f52274a19aad4d50a37dbb6875 # Parent ec66055635440b86c34aef9d65b637b74825744b# Parent 6f51297a0250d22c320601c8e42d0860cde97d69 Merge diff -r ec6605563544 -r aa0616116537 layer/NoteLayer.cpp --- 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; } diff -r ec6605563544 -r aa0616116537 layer/NoteLayer.h --- 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 NoteSet;