From: Carl Worth <cworth@cworth.org>
Date: Tue, 27 Sep 2011 04:58:45 +0000 (-0700)
Subject: Shrink staves once ledger lines are no longer needed.
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=dd9b9d386cfb63002f3e8d1521b25abfa58b76e5;p=scherzo

Shrink staves once ledger lines are no longer needed.

This is not extremely aggressive. It will only shrink once a staff has
no notes left.
---

diff --git a/score.c b/score.c
index 6530a50..26c5a02 100644
--- 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 *