Skip to content

Commit

Permalink
fix #28936
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Aug 5, 2014
1 parent 5373c93 commit 2f8b654
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libmscore/measure.cpp
Expand Up @@ -2473,7 +2473,7 @@ bool Measure::createEndBarLines()
// and forget about any previous bar line

if (span == 0) {
if(cbl && cbl->customSpan()) { // if there is a bar line and has custom span,
if (cbl && cbl->customSpan()) { // if there is a bar line and has custom span,
span = cbl->span(); // get span values from it
spanFrom = cbl->spanFrom();
spanTo = cbl->spanTo();
Expand Down
4 changes: 2 additions & 2 deletions libmscore/score.cpp
Expand Up @@ -2467,9 +2467,9 @@ void Score::cmdRemoveStaff(int staffIdx)
// remove linked staff and measures in linked staves in excerps
// should be done earlier for the main staff
if (s->linkedStaves()) {
for(Staff* staff : s->linkedStaves()->staves()) {
for (Staff* staff : s->linkedStaves()->staves()) {
Score* lscore = staff->score();
if(lscore != this) {
if (lscore != this) {
int lstaffIdx = lscore->staffIdx(staff);
int pIndex = lscore->staffIdx(staff->part());
//adjustBracketsDel(lstaffIdx, lstaffIdx+1);
Expand Down
9 changes: 9 additions & 0 deletions libmscore/staff.cpp
Expand Up @@ -924,5 +924,14 @@ QList<Staff*> Staff::staffList() const
return staffList;
}

//---------------------------------------------------------
// setBarLineTo
//---------------------------------------------------------

void Staff::setBarLineTo(int val)
{
_barLineTo = val;
}

}

2 changes: 1 addition & 1 deletion libmscore/staff.h
Expand Up @@ -184,7 +184,7 @@ class Staff : public QObject {
int barLineTo() const { return _barLineTo; }
void setBarLineSpan(int val) { _barLineSpan = val; }
void setBarLineFrom(int val) { _barLineFrom = val; }
void setBarLineTo(int val) { _barLineTo = val; }
void setBarLineTo(int val);
Score* score() const { return _score; }
qreal mag() const;
qreal height() const;
Expand Down
2 changes: 1 addition & 1 deletion mscore/instrdialog.cpp
Expand Up @@ -1259,7 +1259,7 @@ void MuseScore::editInstrList()
for (int i = 0; i < n; ++i) {
Staff* staff = rootScore->staff(i);
if (staff->barLineSpan() > (n - i))
rootScore->undoChangeBarLineSpan(staff, n - i, 0, rootScore->staff(n-1)->lines()-1);
rootScore->undoChangeBarLineSpan(staff, n - i, 0, (rootScore->staff(n-1)->lines()-1) * 2);
QList<BracketItem> brackets = staff->brackets();
int nn = brackets.size();
for (int ii = 0; ii < nn; ++ii) {
Expand Down

0 comments on commit 2f8b654

Please sign in to comment.