]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.134
authorfred <fred>
Wed, 27 Mar 2002 00:57:02 +0000 (00:57 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:57:02 +0000 (00:57 +0000)
lily/local-key-engraver.cc

index fe1ee8b0d704ae04f7b7a38f6791631180c573b6..e4ac50238835b9f8d7cd934e83a19a46c1ec2b06 100644 (file)
@@ -98,16 +98,20 @@ Local_key_engraver::create_grobs ()
          bool different = !gh_equal_p(prev_acc , gh_int2scm(a));
          int p = gh_number_p(prev_acc) ? gh_scm2int(prev_acc) : 0;
 
-         Grob *tie_break_cautionary = 0;
+         Grob *tie_break_reminder = 0;
          bool tie_changes = false;
          for (int i=0; i < tie_l_arr_.size (); i++)
            if (support_l == Tie::head (tie_l_arr_[i], RIGHT))
              {
                tie_changes = different;
-#if 1
-               /* Enable accidentals for broken tie */
-               tie_break_cautionary = tie_l_arr_[i];
-#endif
+               /* Enable accidentals for broken tie
+
+                  We only want an accidental on a broken tie,
+                  if the tie changes the accidental.
+                  
+                  Maybe check property noTieBreakForceAccidental? */
+               if (different)
+                 tie_break_reminder = tie_l_arr_[i];
                break;
              }
 
@@ -121,7 +125,7 @@ Local_key_engraver::create_grobs ()
          if (((to_boolean (note_l->get_mus_property ("force-accidental"))
                || different)
               && !tie_changes)
-             || tie_break_cautionary)
+             || tie_break_reminder)
            {
              if (!key_item_p_) 
                {
@@ -142,8 +146,8 @@ Local_key_engraver::create_grobs ()
              Local_key_item::add_pitch (key_item_p_, *unsmob_pitch (note_l->get_mus_property ("pitch")),
                                         to_boolean (note_l->get_mus_property ("cautionary")),
                                         extra_natural,
-                                        tie_break_cautionary);
-             Side_position::add_support (key_item_p_,support_l);
+                                        tie_break_reminder);
+             Side_position_interface::add_support (key_item_p_,support_l);
            }
          
          /*
@@ -188,7 +192,7 @@ Local_key_engraver::create_grobs ()
   
   if (key_item_p_ && grace_align_l_)
     {
-      Side_position::add_support (grace_align_l_,key_item_p_);
+      Side_position_interface::add_support (grace_align_l_,key_item_p_);
       grace_align_l_ =0;
     }
 
@@ -202,7 +206,7 @@ Local_key_engraver::create_grobs ()
        (Arpeggios are engraved left of accidentals, of course.)
        */
       for (int i=0;  i < arpeggios_.size ();  i++)
-       Side_position::add_support (arpeggios_[i], key_item_p_);
+       Side_position_interface::add_support (arpeggios_[i], key_item_p_);
 
       arpeggios_.clear ();
     }
@@ -220,7 +224,7 @@ Local_key_engraver::stop_translation_timestep()
   if (key_item_p_)
     {
       for (int i=0; i < support_l_arr_.size(); i++)
-       Side_position::add_support (key_item_p_,support_l_arr_[i]);
+       Side_position_interface::add_support (key_item_p_,support_l_arr_[i]);
 
       typeset_grob (key_item_p_);
       key_item_p_ =0;