]> git.cworth.org Git - scherzo/commitdiff
Shrink staves once ledger lines are no longer needed.
authorCarl Worth <cworth@cworth.org>
Tue, 27 Sep 2011 04:58:45 +0000 (21:58 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Sep 2011 04:58:45 +0000 (21:58 -0700)
This is not extremely aggressive. It will only shrink once a staff has
no notes left.

score.c

diff --git a/score.c b/score.c
index 6530a503c7731fe43508dacf0b2fc2d9db543628..26c5a02818e6ba60ad6f77c7e00141719ff16ddb 100644 (file)
--- a/score.c
+++ b/score.c
@@ -489,6 +489,11 @@ score_remove_note (score_note_t *note)
     }
 
     staff->num_notes -= 1;
+
+    if (staff->num_notes == 0) {
+       staff->upper_ledger_lines = 0;
+       staff->lower_ledger_lines = 0;
+    }
 }
 
 score_note_t *