Merge pull request #16967 from bakajikara/first-system-indentation
Fix #15638: Ignore hidden names on first system
This commit is contained in:
commit
c7d273c633
2 changed files with 4 additions and 4 deletions
|
@ -269,13 +269,13 @@ void System::adjustStavesNumber(size_t nstaves)
|
|||
// instrumentNamesWidth
|
||||
//---------------------------------------------------------
|
||||
|
||||
double System::instrumentNamesWidth()
|
||||
double System::instrumentNamesWidth(const bool isFirstSystem)
|
||||
{
|
||||
double namesWidth = 0.0;
|
||||
|
||||
for (staff_idx_t staffIdx = 0; staffIdx < score()->nstaves(); ++staffIdx) {
|
||||
const SysStaff* staff = this->staff(staffIdx);
|
||||
if (!staff) {
|
||||
if (!staff || (isFirstSystem && !staff->show())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -459,7 +459,7 @@ void System::layoutSystem(LayoutContext& ctx, double xo1, const bool isFirstSyst
|
|||
layoutBrackets(ctx);
|
||||
double maxBracketsWidth = totalBracketOffset(ctx);
|
||||
|
||||
double maxNamesWidth = instrumentNamesWidth();
|
||||
double maxNamesWidth = instrumentNamesWidth(isFirstSystem);
|
||||
|
||||
double indent = maxNamesWidth > 0 ? maxNamesWidth + instrumentNameOffset : 0.0;
|
||||
if (isFirstSystem && firstSystemIndent) {
|
||||
|
|
|
@ -122,7 +122,7 @@ class System final : public EngravingItem
|
|||
Bracket* createBracket(const LayoutContext& ctx, BracketItem* bi, size_t column, staff_idx_t staffIdx, std::vector<Bracket*>& bl,
|
||||
Measure* measure);
|
||||
|
||||
double instrumentNamesWidth();
|
||||
double instrumentNamesWidth(const bool isFirstSystem);
|
||||
double layoutBrackets(const LayoutContext& ctx);
|
||||
static double totalBracketOffset(LayoutContext& ctx);
|
||||
|
||||
|
|
Loading…
Reference in a new issue