Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #39341: crash on tab entry #1458

Merged
merged 1 commit into from
Nov 17, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion libmscore/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,9 @@ void Score::select(Element* e, SelectType type, int staffIdx)
Element* ee = e;
if (ee->type() == Element::Type::NOTE)
ee = ee->parent();
setPlayPos(static_cast<ChordRest*>(ee)->segment()->tick());
int tick = static_cast<ChordRest*>(ee)->segment()->tick();
if (playPos() != tick)
setPlayPos(tick);
}
if (MScore::debugMode)
qDebug("select element <%s> type %hhd(state %hhd) staff %d",
Expand Down Expand Up @@ -3439,6 +3441,8 @@ void Score::setPos(POS pos, int tick)
if (tick != _pos[int(pos)])
_pos[int(pos)] = tick;
// even though tick position might not have changed, layout might have
// so we should update cursor here
// however, we must be careful not to call setPos() again while handling posChanged, or recursion results
emit posChanged(pos, unsigned(tick));
}

Expand Down