Synchronized position of the cursor to note position while dragging

This commit is contained in:
pereverzev_v 2019-12-18 09:59:53 +02:00 committed by Dmitri Ovodok
parent e0c9e8d353
commit 6318b490e2

View file

@ -2384,13 +2384,11 @@ void Note::verticalDrag(EditData &ed)
return;
NoteEditData* ned = static_cast<NoteEditData*>(ed.getData(this));
ned->line = _line;
ned->string = _string;
qreal _spatium = spatium();
bool tab = st->isTabStaff();
qreal step = _spatium * (tab ? st->lineDistance().val() : 0.5);
int lineOffset = lrint(ned->delta.y() / step);
int lineOffset = lrint(ed.delta.y() / step);
if (tab) {
const StringData* strData = staff()->part()->instrument()->stringData();