Skip to content

Commit

Permalink
fix #25844 fixed shift selection
Browse files Browse the repository at this point in the history
fixed shift selection when trying to extend a list selection that contains more than one note
  • Loading branch information
BartlomiejLewandowski committed May 24, 2014
1 parent 6e452db commit 0328e9d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions libmscore/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,10 @@ void Score::select(Element* e, SelectType type, int staffIdx)
int tick = m->tick();
int etick = tick + m->ticks();
activeTrack = staffIdx * VOICES;
if (_selection.state() == SEL_NONE) {
if (_selection.state() == SEL_NONE
|| (_selection.state() == SEL_LIST && !_selection.isSingle())) {
if (_selection.state() == SEL_LIST)
deselectAll();
_selection.setStaffStart(staffIdx);
_selection.setStaffEnd(staffIdx + 1);
_selection.setStartSegment(m->tick2segment(tick));
Expand Down Expand Up @@ -2882,7 +2885,10 @@ void Score::select(Element* e, SelectType type, int staffIdx)
e = e->parent();
ChordRest* cr = static_cast<ChordRest*>(e);

if (_selection.state() == SEL_NONE) {
if (_selection.state() == SEL_NONE
|| (_selection.state() == SEL_LIST && !_selection.isSingle())) {
if (_selection.state() == SEL_LIST)
deselectAll();
_selection.setStaffStart(e->staffIdx());
_selection.setStaffEnd(_selection.staffStart() + 1);
_selection.setStartSegment(cr->segment());
Expand Down Expand Up @@ -2959,6 +2965,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
}
else {
qDebug("sel state %d", _selection.state());
return;
}
selState = SEL_RANGE;
if (!_selection.endSegment())
Expand Down

0 comments on commit 0328e9d

Please sign in to comment.