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

GSoC 2020 Milestone 1: add style options for H-bar multimeasure rests #6161

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions inspectors/view/ui/inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ void Inspector::update(Score* s)
case ElementType::REST:
ie = new InspectorRest(this);
break;
case ElementType::MMREST:
ie = new InspectorMMRest(this);
break;
case ElementType::CLEF:
ie = new InspectorClef(this);
break;
Expand Down
4 changes: 2 additions & 2 deletions libmscore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ add_library (
elementmap.h excerpt.h fermata.h fifo.h figuredbass.h fingering.h fraction.h fret.h glissando.h groups.h hairpin.h
harmony.h hook.h icon.h image.h imageStore.h iname.h input.h instrchange.h instrtemplate.h instrument.h interval.h
jump.h key.h keylist.h keysig.h lasso.h layout.h layoutbreak.h ledgerline.h letring.h line.h location.h
lyrics.h marker.h mcursor.h measure.h measurebase.h mscore.h mscoreview.h musescoreCore.h navigate.h note.h notedot.h
lyrics.h marker.h mcursor.h measure.h measurebase.h mmrest.h mscore.h mscoreview.h musescoreCore.h navigate.h note.h notedot.h
noteevent.h noteline.h ossia.h ottava.h page.h palmmute.h part.h pedal.h pitch.h pitchspelling.h pitchvalue.h
pos.h property.h range.h read206.h realizedharmony.h rehearsalmark.h repeat.h repeatlist.h rest.h revisions.h score.h scoreElement.h segment.h
segmentlist.h select.h sequencer.h shadownote.h shape.h sig.h slur.h slurtie.h spacer.h spanner.h spannermap.h spatium.h
Expand All @@ -69,7 +69,7 @@ add_library (
instrtemplate.cpp instrument.cpp interval.cpp
key.cpp keysig.cpp lasso.cpp
layoutbreak.cpp layout.cpp line.cpp lyrics.cpp measurebase.cpp
measure.cpp navigate.cpp note.cpp noteevent.cpp ottava.cpp
measure.cpp mmrest.cpp navigate.cpp note.cpp noteevent.cpp ottava.cpp
page.cpp part.cpp pedal.cpp letring.cpp vibrato.cpp palmmute.cpp pitch.cpp pitchspelling.cpp
rendermidi.cpp repeat.cpp repeatlist.cpp rest.cpp
score.cpp segment.cpp select.cpp shadownote.cpp slur.cpp tie.cpp slurtie.cpp
Expand Down
1 change: 1 addition & 0 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,7 @@ Element* Score::move(const QString& cmd)
break;
case ElementType::CHORD: // a chord or a rest are valid targets
case ElementType::REST:
case ElementType::MMREST:
trg = el;
cr = toChordRest(trg);
break;
Expand Down
5 changes: 3 additions & 2 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ChordRest* Score::getSelectedChordRest() const
if (el) {
if (el->isNote()) {
return toNote(el)->chord();
} else if (el->isRest() || el->isRepeatMeasure()) {
} else if (el->isRest() || el->isMMRest() || el->isRepeatMeasure()) {
return toRest(el);
} else if (el->isChord()) {
return toChord(el);
Expand Down Expand Up @@ -156,6 +156,7 @@ Fraction Score::pos()
// fall through
case ElementType::REPEAT_MEASURE:
case ElementType::REST:
case ElementType::MMREST:
case ElementType::CHORD:
return toChordRest(el)->tick();
default:
Expand Down Expand Up @@ -1810,7 +1811,7 @@ void Score::deleteItem(Element* el)
undoAddCR(rest, segment->measure(), segment->tick());
}
// fall through

case ElementType::MMREST:
case ElementType::REST:
//
// only allow for voices != 0
Expand Down
4 changes: 4 additions & 0 deletions libmscore/element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "lyrics.h"
#include "marker.h"
#include "measure.h"
#include "mmrest.h"
#include "mscore.h"
#include "notedot.h"
#include "note.h"
Expand Down Expand Up @@ -1104,6 +1105,7 @@ Element* Element::create(ElementType type, Score* score)
case ElementType::FSYMBOL: return new FSymbol(score);
case ElementType::CHORD: return new Chord(score);
case ElementType::REST: return new Rest(score);
case ElementType::MMREST: return new MMRest(score);
case ElementType::SPACER: return new Spacer(score);
case ElementType::STAFF_STATE: return new StaffState(score);
case ElementType::TEMPO_TEXT: return new TempoText(score);
Expand Down Expand Up @@ -1776,6 +1778,7 @@ Element* Element::nextSegmentElement()
}
return p;
case ElementType::REST:
case ElementType::MMREST:
return p;
case ElementType::CHORD: {
Chord* c = toChord(p);
Expand Down Expand Up @@ -1823,6 +1826,7 @@ Element* Element::prevSegmentElement()
}
return p;
case ElementType::REST:
case ElementType::MMREST:
return p;
case ElementType::CHORD: {
Chord* c = toChord(p);
Expand Down
Loading