]> git.donarmstrong.com Git - lilypond.git/commitdiff
lily/page-layout-problem.cc: Avoid repeats of a warning
authorKeith OHara <k-ohara5a5a@oco.net>
Fri, 18 Mar 2011 07:22:28 +0000 (00:22 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Mon, 2 May 2011 05:44:54 +0000 (22:44 -0700)
lily/page-layout-problem.cc

index 636e937a72eab6290433b242a24e992d074f3f0b..fa4bd9c7b416f98aefc6f838b2b082888764ecd0 100644 (file)
@@ -855,10 +855,12 @@ Page_layout_problem::get_spacing_spec (Grob *before, Grob *after, bool pure, int
        {
          Direction before_affinity = to_dir (before->get_maybe_pure_property ("staff-affinity", pure, start, end));
          Direction after_affinity = to_dir (after->get_maybe_pure_property ("staff-affinity", pure, start, end));
-         if (after_affinity > before_affinity)
+         static bool warned = false;
+         if (after_affinity > before_affinity
+             && !warned && !pure)
            {
              warning (_ ("staff-affinities should only decrease"));
-             after_affinity = before_affinity;
+             warned = true;
            }
          if (before_affinity != UP)
            return before->get_maybe_pure_property ("nonstaff-nonstaff-spacing", pure, start, end);