Fixes figuredBassCenterContinuations. (issue4868046)

2011-08-12 Thread bordage . bertrand

Reviewers: ,

Message:
figuredBassCenterContinuations fails to merge continuation lines on if a
figure is composed of three or more figures.

This tiny patch fixes that.

Bertrand

Description:
Fixes figuredBassCenterContinuations.

Please review this at http://codereview.appspot.com/4868046/

Affected files:
  M lily/figured-bass-engraver.cc


Index: lily/figured-bass-engraver.cc
diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc
index  
18b895660fa079c07523a31a1d4ea45802f3f0b3..24bf68db363eb88ae7ccd37a430f7759ddfbe5cf  
100644

--- a/lily/figured-bass-engraver.cc
+++ b/lily/figured-bass-engraver.cc
@@ -217,19 +217,16 @@ Figured_bass_engraver::listen_bass_figure  
(Stream_event *ev)

 void
 Figured_bass_engraver::center_continuations (vectorSpanner * const  
consecutive_lines)

 {
-  if (consecutive_lines.size () == 2)
-{
-  vectorGrob * left_figs;
-  for (vsize j = consecutive_lines.size (); j--;)
-left_figs.push_back (consecutive_lines[j]-get_bound (LEFT));
+  vectorGrob * left_figs;
+  for (vsize j = consecutive_lines.size (); j--;)
+left_figs.push_back (consecutive_lines[j]-get_bound (LEFT));

-  SCM ga = Grob_array::make_array ();
-  unsmob_grob_array (ga)-set_array (left_figs);
+  SCM ga = Grob_array::make_array ();
+  unsmob_grob_array (ga)-set_array (left_figs);

-  for (vsize j = consecutive_lines.size (); j--;)
-consecutive_lines[j]-set_object (figures,
-  unsmob_grob_array  
(ga)-smobbed_copy ());

-}
+  for (vsize j = consecutive_lines.size (); j--;)
+consecutive_lines[j]-set_object (figures,
+  unsmob_grob_array (ga)-smobbed_copy  
());

 }

 void



___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Fixes figuredBassCenterContinuations. (issue4868046)

2011-08-12 Thread reinhold . kainhofer

LGTM. That check has been there since time immemorial. I have sometimes
wondered, too, but never bothered to change anything (since I don't use
continuation combining).


http://codereview.appspot.com/4868046/diff/4/lily/figured-bass-engraver.cc
File lily/figured-bass-engraver.cc (left):

http://codereview.appspot.com/4868046/diff/4/lily/figured-bass-engraver.cc#oldcode220
lily/figured-bass-engraver.cc:220: if (consecutive_lines.size () == 2)
I always thought this was on purpose, so I didn't bother to change it.

http://codereview.appspot.com/4868046/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Fixes figuredBassCenterContinuations. (issue4868046)

2011-08-12 Thread Bertrand Bordage
This was introduced in one of Han-Wen's commits
: 7d7d33f3f1c6c45aaf3fd1e5c68b0b75a1be248d
At that time there was no property to center figures, that's probably why
Han-Wen added this condition (I know, this doesn't explain well its
presence).
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel