convert enum SelState into enum class

This commit is contained in:
Joachim Schmitz 2014-05-26 13:21:04 +02:00
parent 075c95aca7
commit cd48d9ccfd
15 changed files with 92 additions and 92 deletions

View file

@ -1585,7 +1585,7 @@ void Score::moveDown(Chord* chord)
void Score::cmdAddStretch(qreal val)
{
if (selection().state() != SEL_RANGE)
if (selection().state() != SelState::RANGE)
return;
int startTick = selection().tickStart();
int endTick = selection().tickEnd();
@ -1618,7 +1618,7 @@ void Score::cmdInsertClef(ClefType type)
void Score::cmdResetBeamMode()
{
if (selection().state() != SEL_RANGE) {
if (selection().state() != SelState::RANGE) {
qDebug("no system or staff selected");
return;
}

View file

@ -1347,7 +1347,7 @@ void Score::deleteItem(Element* el)
void Score::cmdDeleteSelectedMeasures()
{
if (selection().state() != SEL_RANGE)
if (selection().state() != SelState::RANGE)
return;
MeasureBase* is = selection().startSegment()->measure();
@ -1470,7 +1470,7 @@ void Score::cmdDeleteSelectedMeasures()
void Score::cmdDeleteSelection()
{
if (selection().state() == SEL_RANGE) {
if (selection().state() == SelState::RANGE) {
Segment* s1 = selection().startSegment();
Segment* s2 = selection().endSegment();
int stick1 = selection().tickStart();
@ -1593,7 +1593,7 @@ void Score::cmdDeleteSelection()
void Score::cmdFullMeasureRest()
{
if (selection().state() == SEL_RANGE) {
if (selection().state() == SelState::RANGE) {
Segment* s1 = selection().startSegment();
Segment* s2 = selection().endSegment();
int stick1 = selection().tickStart();
@ -1790,7 +1790,7 @@ void Score::colorItem(Element* element)
void Score::cmdExchangeVoice(int s, int d)
{
if (selection().state() != SEL_RANGE) {
if (selection().state() != SelState::RANGE) {
selectStavesMessage();
return;
}

View file

@ -359,7 +359,7 @@ ChordRest* Score::nextMeasure(ChordRest* element, bool selectBehavior)
int endTick = element->measure()->last()->nextChordRest(element->track(), true)->tick();
bool last = false;
if (selection().state() == SEL_RANGE) {
if (selection().state() == SelState::RANGE) {
if (element->tick() != endTick && selection().tickEnd() <= endTick) {
measure = element->measure();
last = true;
@ -408,7 +408,7 @@ ChordRest* Score::prevMeasure(ChordRest* element)
int startTick = element->measure()->first()->nextChordRest(element->track())->tick();
bool last = false;
if ((selection().state() == SEL_RANGE)
if ((selection().state() == SelState::RANGE)
&& selection().isEndActive() && selection().startSegment()->tick() <= startTick)
last = true;
else if (element->tick() != startTick) {

View file

@ -325,8 +325,8 @@ void Score::pasteStaff(XmlReader& e, ChordRest* dst)
_selection.updateSelectedElements();
foreach(MuseScoreView* v, viewer)
v->adjustCanvasPosition(s1, false);
if (selection().state() != SEL_RANGE)
_selection.setState(SEL_RANGE);
if (selection().state() != SelState::RANGE)
_selection.setState(SelState::RANGE);
}
}
foreach (Score* s, scoreList()) // for all parts

View file

@ -2743,7 +2743,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
if (type == SELECT_SINGLE) {
deselectAll();
if (e == 0) {
selState = SEL_NONE;
selState = SelState::NONE;
_updateAll = true;
}
else {
@ -2754,7 +2754,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
refresh |= e->abbox();
_selection.add(e);
_is.setTrack(e->track());
selState = SEL_LIST;
selState = SelState::LIST;
if (e->type() == Element::ElementType::NOTE)
e = e->parent();
if (e->type() == Element::ElementType::REST || e->type() == Element::ElementType::CHORD) {
@ -2770,7 +2770,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
Measure* m = static_cast<Measure*>(e);
int tick = m->tick();
// int etick = tick + m->ticks();
if (_selection.state() == SEL_NONE) {
if (_selection.state() == SelState::NONE) {
_selection.setStartSegment(m->tick2segment(tick));
// _selection.setEndSegment(m == lastMeasure() ? 0 : tick2segment(etick));
_selection.setEndSegment(m == lastMeasure() ? 0 : m->last());
@ -2780,13 +2780,13 @@ void Score::select(Element* e, SelectType type, int staffIdx)
return;
}
_updateAll = true;
selState = SEL_RANGE;
selState = SelState::RANGE;
_selection.setStaffStart(0);
_selection.setStaffEnd(nstaves());
_selection.updateSelectedElements();
}
else {
if (_selection.state() == SEL_RANGE) {
if (_selection.state() == SelState::RANGE) {
select(0, SELECT_SINGLE, 0);
return;
}
@ -2796,7 +2796,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
_selection.remove(e);
else {
_selection.add(e);
selState = SEL_LIST;
selState = SelState::LIST;
}
}
}
@ -2809,9 +2809,9 @@ 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
|| (_selection.state() == SEL_LIST && !_selection.isSingle())) {
if (_selection.state() == SEL_LIST)
if (_selection.state() == SelState::NONE
|| (_selection.state() == SelState::LIST && !_selection.isSingle())) {
if (_selection.state() == SelState::LIST)
deselectAll();
_selection.setStaffStart(staffIdx);
_selection.setStaffEnd(staffIdx + 1);
@ -2819,7 +2819,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
// _selection.setEndSegment(m == lastMeasure() ? 0 : tick2segment(etick));
_selection.setEndSegment(m == lastMeasure() ? 0 : m->last());
}
else if (_selection.state() == SEL_RANGE) {
else if (_selection.state() == SelState::RANGE) {
if (staffIdx < _selection.staffStart())
_selection.setStaffStart(staffIdx);
else if (staffIdx >= _selection.staffEnd())
@ -2885,9 +2885,9 @@ void Score::select(Element* e, SelectType type, int staffIdx)
e = e->parent();
ChordRest* cr = static_cast<ChordRest*>(e);
if (_selection.state() == SEL_NONE
|| (_selection.state() == SEL_LIST && !_selection.isSingle())) {
if (_selection.state() == SEL_LIST)
if (_selection.state() == SelState::NONE
|| (_selection.state() == SelState::LIST && !_selection.isSingle())) {
if (_selection.state() == SelState::LIST)
deselectAll();
_selection.setStaffStart(e->staffIdx());
_selection.setStaffEnd(_selection.staffStart() + 1);
@ -2934,7 +2934,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
return;
}
}
else if (_selection.state() == SEL_RANGE) {
else if (_selection.state() == SelState::RANGE) {
staffIdx = cr->staffIdx();
int tick = cr->tick();
if (staffIdx < _selection.staffStart())
@ -2967,7 +2967,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
qDebug("sel state %d", _selection.state());
return;
}
selState = SEL_RANGE;
selState = SelState::RANGE;
if (!_selection.endSegment())
_selection.setEndSegment(cr->segment()->nextCR());
if (!_selection.startSegment())
@ -2985,7 +2985,7 @@ void Score::select(Element* e, SelectType type, int staffIdx)
_selection.setActiveTrack(activeTrack);
selState = SEL_RANGE;
selState = SelState::RANGE;
_selection.updateSelectedElements();
}
_selection.setState(selState);
@ -3031,11 +3031,11 @@ void Score::lassoSelectEnd()
int endStaff = 0;
if (_selection.elements().isEmpty()) {
_selection.setState(SEL_NONE);
_selection.setState(SelState::NONE);
_updateAll = true;
return;
}
_selection.setState(SEL_LIST);
_selection.setState(SelState::LIST);
foreach(const Element* e, _selection.elements()) {
if (e->type() != Element::ElementType::NOTE && e->type() != Element::ElementType::REST)
@ -3058,8 +3058,8 @@ void Score::lassoSelectEnd()
if (noteRestCount > 0) {
endSegment = endSegment->nextCR(endStaff * VOICES);
_selection.setRange(startSegment, endSegment, startStaff, endStaff+1);
if (_selection.state() != SEL_RANGE)
_selection.setState(SEL_RANGE);
if (_selection.state() != SelState::RANGE)
_selection.setState(SelState::RANGE);
}
_updateAll = true;
}
@ -3164,7 +3164,7 @@ void Score::cmdSelectAll()
{
if (_measures.size() == 0)
return;
_selection.setState(SEL_RANGE);
_selection.setState(SelState::RANGE);
Segment* s1 = firstMeasureMM()->first();
Segment* s2 = lastMeasureMM()->last();
_selection.setRange(s1, s2, 0, nstaves());

View file

@ -50,7 +50,7 @@ namespace Ms {
Selection::Selection(Score* s)
{
_score = s;
_state = SEL_NONE;
_state = SelState::NONE;
_startSegment = 0;
_endSegment = 0;
_activeSegment = 0;
@ -115,7 +115,7 @@ Element* Selection::element() const
ChordRest* Selection::activeCR() const
{
if ((_state != SEL_RANGE) || !_activeSegment)
if ((_state != SelState::RANGE) || !_activeSegment)
return 0;
if (_activeSegment == _startSegment)
return firstChordRest(_activeTrack);
@ -208,7 +208,7 @@ Measure* Selection::findMeasure() const
void Selection::deselectAll()
{
if (_state == SEL_RANGE)
if (_state == SelState::RANGE)
_score->setUpdateAll();
clear();
updateState();
@ -232,7 +232,7 @@ void Selection::clear()
_staffStart = 0;
_staffEnd = 0;
_activeTrack = 0;
setState(SEL_NONE);
setState(SelState::NONE);
}
//---------------------------------------------------------
@ -356,7 +356,7 @@ void Selection::setRange(Segment* a, Segment* b, int c, int d)
_activeSegment = b;
_staffStart = c;
_staffEnd = d;
setState(SEL_RANGE);
setState(SelState::RANGE);
}
//---------------------------------------------------------
@ -379,9 +379,9 @@ void Selection::dump()
{
qDebug("Selection dump: ");
switch(_state) {
case SEL_NONE: qDebug("NONE"); return;
case SEL_RANGE: qDebug("RANGE"); break;
case SEL_LIST: qDebug("LIST"); break;
case SelState::NONE: qDebug("NONE"); return;
case SelState::RANGE: qDebug("RANGE"); break;
case SelState::LIST: qDebug("LIST"); break;
}
foreach(const Element* e, _el)
qDebug(" %p %s", e, e->name());
@ -397,9 +397,9 @@ void Selection::updateState()
int n = _el.size();
Element* e = element();
if (n == 0)
setState(SEL_NONE);
else if (_state == SEL_NONE)
setState(SEL_LIST);
setState(SelState::NONE);
else if (_state == SelState::NONE)
setState(SelState::LIST);
if (!_score->noteEntryMode())
_score->inputState().update(e);
}
@ -424,11 +424,11 @@ QString Selection::mimeType() const
{
switch (_state) {
default:
case SEL_NONE:
case SelState::NONE:
return QString();
case SEL_LIST:
case SelState::LIST:
return isSingle() ? mimeSymbolFormat : mimeSymbolListFormat;
case SEL_RANGE:
case SelState::RANGE:
return mimeStaffListFormat;
}
}
@ -441,7 +441,7 @@ QByteArray Selection::mimeData() const
{
QByteArray a;
switch (_state) {
case SEL_LIST:
case SelState::LIST:
if (isSingle()) {
Element* e = element();
if (e->type() == Element::ElementType::TEXTLINE_SEGMENT)
@ -451,9 +451,9 @@ QByteArray Selection::mimeData() const
else
a = symbolListMimeData();
break;
case SEL_NONE:
case SelState::NONE:
break;
case SEL_RANGE:
case SelState::RANGE:
a = staffMimeData();
break;
}
@ -723,13 +723,13 @@ QList<Note*> Selection::noteList(int selTrack) const
{
QList<Note*>nl;
if (_state == SEL_LIST) {
if (_state == SelState::LIST) {
foreach(Element* e, _el) {
if (e->type() == Element::ElementType::NOTE)
nl.append(static_cast<Note*>(e));
}
}
else if (_state == SEL_RANGE) {
else if (_state == SelState::RANGE) {
for (int staffIdx = staffStart(); staffIdx < staffEnd(); ++staffIdx) {
int startTrack = staffIdx * VOICES;
int endTrack = startTrack + VOICES;
@ -804,7 +804,7 @@ static bool checkEnd(Element* e)
bool Selection::canCopy() const
{
if (_state != SEL_RANGE)
if (_state != SelState::RANGE)
return true;
for (int staffIdx = _staffStart; staffIdx != _staffEnd; ++staffIdx)
@ -836,7 +836,7 @@ bool Selection::canCopy() const
bool Selection::measureRange(Measure** m1, Measure** m2) const
{
if (state() != SEL_RANGE)
if (state() != SelState::RANGE)
return false;
*m1 = startSegment()->measure();
*m2 = endSegment()->measure();

View file

@ -42,25 +42,25 @@ struct ElementPattern {
// SelState
//---------------------------------------------------------
enum SelState {
SEL_NONE, // nothing is selected
SEL_LIST, // disjoint selection
SEL_RANGE, // adjacent selection, a range in one or more staves
enum SelState : char {
NONE, // nothing is selected
LIST, // disjoint selection
RANGE, // adjacent selection, a range in one or more staves
// is selected
};
//-------------------------------------------------------------------
// Selection
// For SEL_LIST state only visible elements can be selected
// For SelState::LIST state only visible elements can be selected
// (no Chord element etc.).
//-------------------------------------------------------------------
class Selection {
Score* _score;
SelState _state;
QList<Element*> _el; // valid in mode SEL_LIST
QList<Element*> _el; // valid in mode SelState::LIST
int _staffStart; // valid if selState is SEL_RANGE
int _staffStart; // valid if selState is SelState::RANGE
int _staffEnd;
Segment* _startSegment;
Segment* _endSegment; // next segment after selection
@ -72,7 +72,7 @@ class Selection {
QByteArray symbolListMimeData() const;
public:
Selection() { _score = 0; _state = SEL_NONE; }
Selection() { _score = 0; _state = SelState::NONE; }
Selection(Score*);
Score* score() const { return _score; }
SelState state() const { return _state; }
@ -84,7 +84,7 @@ class Selection {
const QList<Element*> uniqueElements() const;
QList<Note*> uniqueNotes(int track = -1) const;
bool isSingle() const { return (_state == SEL_LIST) && (_el.size() == 1); }
bool isSingle() const { return (_state == SelState::LIST) && (_el.size() == 1); }
void add(Element*);
void deselectAll();

View file

@ -265,7 +265,7 @@ void Score::transpose(Note* n, Interval interval, bool useDoubleSharpsFlats)
void Score::transpose(int mode, TransposeDirection direction, int transposeKey,
int transposeInterval, bool trKeys, bool transposeChordNames, bool useDoubleSharpsFlats)
{
bool rangeSelection = selection().state() == SEL_RANGE;
bool rangeSelection = selection().state() == SelState::RANGE;
int startStaffIdx = 0;
int startTick = 0;
if (rangeSelection) {
@ -300,7 +300,7 @@ void Score::transpose(int mode, TransposeDirection direction, int transposeKey,
if (direction == TRANSPOSE_DOWN)
transposeInterval *= -1;
if (_selection.state() == SEL_LIST) {
if (_selection.state() == SelState::LIST) {
foreach(Element* e, _selection.uniqueElements()) {
if (e->staff()->staffType()->group() == PERCUSSION_STAFF_GROUP)
continue;

View file

@ -1955,7 +1955,7 @@ bool MuseScore::saveAs(Score* cs, bool saveCopy)
bool MuseScore::saveSelection(Score* cs)
{
if (cs->selection().state() != SEL_RANGE) {
if (cs->selection().state() != SelState::RANGE) {
if(!MScore::noGui) QMessageBox::warning(mscore, tr("MuseScore: Save Selection"), tr("Please select one or more measures"));
return false;
}

View file

@ -145,7 +145,7 @@ extern TextPalette* textPalette;
void MuseScore::cmdInsertMeasures()
{
if (cs) {
if (cs->selection().state() == SEL_NONE && !cs->selection().findMeasure()) {
if (cs->selection().state() == SelState::NONE && !cs->selection().findMeasure()) {
QMessageBox::warning(0, "MuseScore",
tr("No measure selected:\n" "Please select a measure and try again"));
}
@ -809,7 +809,7 @@ MuseScore::MuseScore()
a = getAction("paste");
a->setEnabled(false);
menuEdit->addAction(a);
selectionChanged(SEL_NONE);
selectionChanged(SelState::NONE);
menuEdit->addSeparator();
menuEdit->addAction(getAction("select-all"));
@ -1291,7 +1291,7 @@ void MuseScore::selectScore(QAction* action)
void MuseScore::selectionChanged(int selectionState)
{
bool enable = selectionState != SEL_NONE;
bool enable = selectionState != SelState::NONE;
getAction("cut")->setEnabled(enable);
getAction("copy")->setEnabled(enable);
if (pianorollEditor)
@ -3863,7 +3863,7 @@ void MuseScore::transpose()
{
if (cs->last() == 0) // empty score?
return;
if (cs->selection().state() != SEL_RANGE) {
if (cs->selection().state() != SelState::RANGE) {
QMessageBox::StandardButton sb = QMessageBox::question(mscore,
tr("MuseScore: Transpose"),
tr("There is nothing selected. Transpose whole score?"),
@ -3875,7 +3875,7 @@ void MuseScore::transpose()
//
// select all
//
cs->selection().setState(SEL_RANGE);
cs->selection().setState(SelState::RANGE);
cs->selection().setStartSegment(cs->tick2segment(0));
cs->selection().setEndSegment(
cs->tick2segment(cs->last()->tick() + cs->last()->ticks())
@ -3883,10 +3883,10 @@ void MuseScore::transpose()
cs->selection().setStaffStart(0);
cs->selection().setStaffEnd(cs->nstaves());
}
bool rangeSelection = cs->selection().state() == SEL_RANGE;
bool rangeSelection = cs->selection().state() == SelState::RANGE;
TransposeDialog td;
// TRANSPOSE_BY_KEY and "transpose keys" is only possible if selection state is SEL_RANGE
// TRANSPOSE_BY_KEY and "transpose keys" is only possible if selection state is SelState::RANGE
td.enableTransposeKeys(rangeSelection);
td.enableTransposeByKey(rangeSelection);
@ -3998,7 +3998,7 @@ void MuseScore::endCmd()
else {
if (inspector)
inspector->setElement(0);
selectionChanged(SEL_NONE);
selectionChanged(SelState::NONE);
}
}
@ -4251,7 +4251,7 @@ void MuseScore::cmd(QAction* a, const QString& cmd)
addTempo();
else if (cmd == "loop") {
if (loop()) {
if (cs->selection().state() == SEL_RANGE)
if (cs->selection().state() == SelState::RANGE)
seq->setLoopSelection();
}
}

View file

@ -292,7 +292,7 @@ void Palette::mouseDoubleClickEvent(QMouseEvent* ev)
return;
const Selection& sel = score->selection();
if (sel.state() == SEL_NONE)
if (sel.state() == SelState::NONE)
return;
Element* element = 0;
@ -309,11 +309,11 @@ void Palette::mouseDoubleClickEvent(QMouseEvent* ev)
&& viewer->mscoreState() != STATE_TEXT_EDIT) { // Already in startCmd in this case
score->startCmd();
}
if (sel.state() == SEL_LIST) {
if (sel.state() == SelState::LIST) {
foreach(Element* e, sel.elements())
applyDrop(score, viewer, e, element);
}
else if (sel.state() == SEL_RANGE) {
else if (sel.state() == SelState::RANGE) {
// TODO: check for other element types:
if (element->type() == Element::ElementType::BAR_LINE) {
// TODO: apply to multiple measures

View file

@ -1832,7 +1832,7 @@ void ScoreView::paint(const QRect& r, QPainter& p)
p.drawRect(r);
}
const Selection& sel = _score->selection();
if (sel.state() == SEL_RANGE) {
if (sel.state() == SelState::RANGE) {
Segment* ss = sel.startSegment();
Segment* es = sel.endSegment();
if (!ss)
@ -2405,7 +2405,7 @@ void ScoreView::normalPaste()
qDebug("no application mime data");
return;
}
if ((_score->selection().isSingle()|| _score->selection().state() == SEL_LIST) && ms->hasFormat(mimeSymbolFormat)) {
if ((_score->selection().isSingle()|| _score->selection().state() == SelState::LIST) && ms->hasFormat(mimeSymbolFormat)) {
QByteArray data(ms->data(mimeSymbolFormat));
XmlReader e(data);
QPointF dragOffset;
@ -2441,10 +2441,10 @@ void ScoreView::normalPaste()
else
qDebug("cannot read type");
}
else if ((_score->selection().state() == SEL_RANGE || _score->selection().state() == SEL_LIST)
else if ((_score->selection().state() == SelState::RANGE || _score->selection().state() == SelState::LIST)
&& ms->hasFormat(mimeStaffListFormat)) {
ChordRest* cr = 0;
if (_score->selection().state() == SEL_RANGE)
if (_score->selection().state() == SelState::RANGE)
cr = _score->selection().firstChordRest();
else if (_score->selection().isSingle()) {
Element* e = _score->selection().element();
@ -2471,7 +2471,7 @@ void ScoreView::normalPaste()
else if (ms->hasFormat(mimeSymbolListFormat)) {
ChordRest* cr = 0;
if (_score->selection().state() == SEL_RANGE)
if (_score->selection().state() == SelState::RANGE)
cr = _score->selection().firstChordRest();
else if (_score->selection().isSingle()) {
Element* e = _score->selection().element();
@ -3934,7 +3934,7 @@ void ScoreView::cmdAddSlur()
is.setSlur(nullptr);
return;
}
if (_score->selection().state() == SEL_RANGE) {
if (_score->selection().state() == SelState::RANGE) {
_score->startCmd();
int startTrack = _score->selection().staffStart() * VOICES;
int endTrack = _score->selection().staffEnd() * VOICES;
@ -3993,7 +3993,7 @@ void ScoreView::cmdAddNoteLine()
{
Note* firstNote = 0;
Note* lastNote = 0;
if (_score->selection().state() == SEL_RANGE) {
if (_score->selection().state() == SelState::RANGE) {
int startTrack = _score->selection().staffStart() * VOICES;
int endTrack = _score->selection().staffEnd() * VOICES;
for (int track = startTrack; track < endTrack; ++track) {
@ -4382,7 +4382,7 @@ void ScoreView::modifyElement(Element* el)
}
Score* cs = el->score();
if (!cs->selection().isSingle()) {
qDebug("modifyElement: cs->selection().state() != SEL_SINGLE");
qDebug("modifyElement: cs->selection().state() != SelState::SINGLE");
delete el;
return;
}
@ -5020,7 +5020,7 @@ void ScoreView::appendMeasures(int n, Element::ElementType type)
MeasureBase* ScoreView::checkSelectionStateForInsertMeasure()
{
MeasureBase* mb = 0;
if (_score->selection().state() == SEL_RANGE) {
if (_score->selection().state() == SelState::RANGE) {
mb = _score->selection().startSegment()->measure();
return mb;
}
@ -5107,7 +5107,7 @@ void ScoreView::cmdRepeatSelection()
}
return;
}
if (selection.state() != SEL_RANGE) {
if (selection.state() != SelState::RANGE) {
qDebug("wrong selection type");
return;
}
@ -5158,13 +5158,13 @@ void ScoreView::selectMeasure(int n)
for (Measure* measure = _score->firstMeasure(); measure; measure = measure->nextMeasure()) {
if (++i < n)
continue;
_score->selection().setState(SEL_RANGE);
_score->selection().setState(SelState::RANGE);
_score->selection().setStartSegment(measure->first());
_score->selection().setEndSegment(measure->last());
_score->selection().setStaffStart(0);
_score->selection().setStaffEnd(_score->nstaves());
_score->selection().updateSelectedElements();
_score->selection().setState(SEL_RANGE);
_score->selection().setState(SelState::RANGE);
_score->addRefresh(measure->canvasBoundingRect());
adjustCanvasPosition(measure, true);
_score->setUpdateAll(true);

View file

@ -307,7 +307,7 @@ void Seq::start()
}
}
if ((mscore->loop())) {
if(cs->selection().state() == SEL_RANGE)
if(cs->selection().state() == SelState::RANGE)
setLoopSelection();
seek(cs->repeatList()->tick2utick(cs->loopInTick()));
}

View file

@ -100,10 +100,10 @@ static void paste(Score* _score)
else
qDebug("cannot read type");
}
else if ((_score->selection().state() == SEL_RANGE || _score->selection().state() == SEL_LIST)
else if ((_score->selection().state() == SelState::RANGE || _score->selection().state() == SelState::LIST)
&& ms->hasFormat(mimeStaffListFormat)) {
ChordRest* cr = 0;
if (_score->selection().state() == SEL_RANGE)
if (_score->selection().state() == SelState::RANGE)
cr = _score->selection().firstChordRest();
else if (_score->selection().isSingle()) {
Element* e = _score->selection().element();

View file

@ -149,7 +149,7 @@ void TestCopyPasteSymbolList::copypaste(const char* name, const char* idx)
return;
}
ChordRest* cr = 0;
if (score->selection().state() == SEL_RANGE)
if (score->selection().state() == SelState::RANGE)
cr = score->selection().firstChordRest();
else if (score->selection().isSingle()) {
Element* e = score->selection().element();