Skip to content

Commit

Permalink
Fix #232931 follow-up: change behavior of adding breaks from palette
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacWeiss committed Jul 25, 2017
1 parent f5e493c commit 7175e7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libmscore/score.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ class Score : public QObject, ScoreElement {
void cmdToggleHideEmpty();
void cmdSetVisible();
void cmdUnsetVisible();
void cmdToggleLayoutBreak(LayoutBreak::Type);
inline virtual Movements* movements();
inline virtual const Movements* movements() const;

Expand Down Expand Up @@ -574,6 +573,7 @@ class Score : public QObject, ScoreElement {
void cmdHalfDuration() { cmdIncDecDuration( 1, 0); }
void cmdIncDurationDotted() { cmdIncDecDuration(-1, 1); }
void cmdDecDurationDotted() { cmdIncDecDuration( 1, 1); }
void cmdToggleLayoutBreak(LayoutBreak::Type);

void addRemoveBreaks(int interval, bool lock);

Expand Down
5 changes: 4 additions & 1 deletion mscore/palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ void Palette::mouseDoubleClickEvent(QMouseEvent* ev)
|| element->type() == ElementType::MARKER
|| element->type() == ElementType::JUMP
|| element->type() == ElementType::SPACER
|| element->type() == ElementType::LAYOUT_BREAK
|| element->type() == ElementType::VBOX
|| element->type() == ElementType::HBOX
|| element->type() == ElementType::TBOX
Expand All @@ -503,6 +502,10 @@ void Palette::mouseDoubleClickEvent(QMouseEvent* ev)
break;
}
}
else if (element->type() == ElementType::LAYOUT_BREAK) {
LayoutBreak* breakElement = static_cast<LayoutBreak*>(element);
score->cmdToggleLayoutBreak(breakElement->layoutBreakType());
}
else if (element->isClef() || element->isKeySig() || element->isTimeSig()) {
Measure* m1 = sel.startSegment()->measure();
Measure* m2 = sel.endSegment() ? sel.endSegment()->measure() : nullptr;
Expand Down

0 comments on commit 7175e7f

Please sign in to comment.