Skip to content

Commit

Permalink
fix #84806: crash adding note that creates tie in tab staff
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Oct 26, 2015
1 parent dd4530e commit f3b18aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mscore/scoreview.cpp
Expand Up @@ -1461,16 +1461,16 @@ void ScoreView::moveCursor()
Segment* seg = is.segment();
int minTrack = (is.track() / VOICES) * VOICES;
int maxTrack = minTrack + VOICES;
// get selected chordrest, if one exists and is in this segment
// get selected chord, if one exists and is in this segment
ChordRest* scr = _score->selection().cr();
if (scr && scr->segment() != seg)
if (scr && (scr->type() != Element::Type::CHORD || scr->segment() != seg))
scr = nullptr;
// get the physical string corresponding to current visual string
for (int t = minTrack; t < maxTrack; t++) {
Element* e = seg->element(t);
if (e != nullptr && e->type() == Element::Type::CHORD) {
// if there is a selected chordrest in this segment on this track but it is not e
// then the selected chordrest must be a grace note chord, and we should use it
// if there is a selected chord in this segment on this track but it is not e
// then the selected chord must be a grace note chord, and we should use it
if (scr && scr->track() == t && scr != e)
e = scr;
// search notes looking for one on current string
Expand Down

0 comments on commit f3b18aa

Please sign in to comment.