Skip to content

Commit

Permalink
allow all fermatas to be added to rests
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jun 21, 2014
1 parent b4066a7 commit d9f6bcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions libmscore/articulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ class Articulation : public Element {
const ArticulationInfo* articulationInfo() const { return &articulationList[int(articulationType())]; }

static QString idx2name(int idx);
bool isFermata() { return _articulationType == ArticulationType::Fermata ||
_articulationType == ArticulationType::Shortfermata ||
_articulationType == ArticulationType::Longfermata ||
_articulationType == ArticulationType::Verylongfermata; }
};


Expand Down
4 changes: 2 additions & 2 deletions libmscore/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ bool Rest::acceptDrop(MuseScoreView*, const QPointF&, Element* e) const
|| (type == ElementType::ICON && static_cast<Icon*>(e)->iconType() == IconType::BEAM32)
|| (type == ElementType::ICON && static_cast<Icon*>(e)->iconType() == IconType::BEAM64)
|| (type == ElementType::ICON && static_cast<Icon*>(e)->iconType() == IconType::AUTOBEAM)
|| (type == ElementType::ARTICULATION && static_cast<Articulation*>(e)->articulationType() == ArticulationType::Fermata)
|| (type == ElementType::ARTICULATION && static_cast<Articulation*>(e)->isFermata())
|| (type == ElementType::CLEF)
|| (type == ElementType::STAFF_TEXT)
|| (type == ElementType::BAR_LINE)
Expand Down Expand Up @@ -208,7 +208,7 @@ Element* Rest::drop(const DropData& data)
case ElementType::ARTICULATION:
{
Articulation* a = static_cast<Articulation*>(e);
if (a->articulationType() != ArticulationType::Fermata
if (!a->isFermata()
|| !score()->addArticulation(this, a)) {
delete e;
e = 0;
Expand Down

0 comments on commit d9f6bcf

Please sign in to comment.