Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/engraving/dom/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
return false;
}

return showMeasureNumber() && score()->staff(staffIdx)->shouldShowMeasureNumbers();
return showMeasureNumber() && score()->staff(staffIdx)->shouldShowMeasureNumbers() && !score()->allStavesInvisible();
}

//---------------------------------------------------------
Expand All @@ -622,7 +622,7 @@
case MeasureNumberMode::HIDE:
return false;
}
}

Check warning on line 625 in src/engraving/dom/measure.cpp

View workflow job for this annotation

GitHub Actions / build (linux_arm64)

control reaches end of non-void function [-Wreturn-type]

Check warning on line 625 in src/engraving/dom/measure.cpp

View workflow job for this annotation

GitHub Actions / windows_x64

'mu::engraving::Measure::showMeasureNumber': not all control paths return a value

Check warning on line 625 in src/engraving/dom/measure.cpp

View workflow job for this annotation

GitHub Actions / build (linux_x64)

control reaches end of non-void function [-Wreturn-type]

//---------------------------------------------------------
// findChord
Expand Down
11 changes: 11 additions & 0 deletions src/engraving/dom/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5832,6 +5832,17 @@ size_t Score::visibleStavesCount() const
return count;
}

bool Score::allStavesInvisible() const
{
for (const Staff* staff : m_staves) {
if (staff->show()) {
return false;
}
}

return true;
}

ShadowNote* Score::shadowNote() const
{
return m_shadowNote;
Expand Down
1 change: 1 addition & 0 deletions src/engraving/dom/score.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ class Score : public EngravingObject, public muse::Injectable
const std::vector<Staff*>& staves() const { return m_staves; }
size_t nstaves() const { return m_staves.size(); }
size_t visibleStavesCount() const;
bool allStavesInvisible() const;
size_t ntracks() const { return m_staves.size() * VOICES; }

staff_idx_t staffIdx(const Staff*) const;
Expand Down
Loading