# HG changeset patch # User Chris Cannam # Date 1551780168 0 # Node ID 6f51297a0250d22c320601c8e42d0860cde97d69 # Parent 70e93f996da6f737e89d4d31943e72e309195e69 Keep the point being edited highlighted while the edit dialog is open diff -r 70e93f996da6 -r 6f51297a0250 layer/NoteLayer.cpp --- a/layer/NoteLayer.cpp Mon Feb 18 14:33:35 2019 +0000 +++ b/layer/NoteLayer.cpp Tue Mar 05 10:02:48 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 70e93f996da6 -r 6f51297a0250 layer/NoteLayer.h --- a/layer/NoteLayer.h Mon Feb 18 14:33:35 2019 +0000 +++ b/layer/NoteLayer.h Tue Mar 05 10:02:48 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;