]> git.donarmstrong.com Git - lilypond.git/commitdiff
Dots in chords can not be moved Issue 1266
authorSeafire <seafire8@gmail.com>
Mon, 3 Oct 2011 06:30:36 +0000 (01:30 -0500)
committerDavid Kastrup <dak@gnu.org>
Thu, 3 Nov 2011 15:19:25 +0000 (16:19 +0100)
lily/dot-column.cc
lily/dot-configuration.cc
lily/include/dot-configuration.hh

index 46b13811be3c9c20c70826c9b13b195ee60064e0..320f0e4051100a66dfc8f62a067fa9616252523b 100644 (file)
@@ -164,9 +164,8 @@ Dot_column::calc_positioning_done (SCM smob)
       Grob *note = dots[i]->get_parent (Y_AXIS);
       if (note)
         {
-          Grob *stem = unsmob_grob (note->get_object ("stem"));
-          if (stem)
-            dp.extremal_head_ = Stem::first_head (stem) == note;
+          if (Note_head::has_interface (note))
+            dp.dir_ = to_dir (dp.dot_->get_property ("direction"));
 
           dp.x_extent_ = note->extent (commonx, X_AXIS);
         }
@@ -177,8 +176,6 @@ Dot_column::calc_positioning_done (SCM smob)
          offset callback but adding a dot overwrites Y-offset. */
       p += (int) robust_scm2double (dp.dot_->get_property ("staff-position"), 0.0);
       dp.pos_ = p;
-      if (dp.extremal_head_)
-        dp.dir_ = to_dir (dp.dot_->get_property ("direction"));
 
       cfg.remove_collision (p);
       cfg[p] = dp;
index fefb9834330e1418ff8966d4742b2a23b0414873..4b57faffc31ec9cd017c8a4ff8990e9022f451be 100644 (file)
@@ -33,14 +33,9 @@ Dot_configuration::badness () const
       int demerit = sqr (p - i->second.pos_) * 2;
 
       int dot_move_dir = sign (p - i->second.pos_);
-      if (i->second.extremal_head_)
-        {
-          if (i->second.dir_
-              && dot_move_dir != i->second.dir_)
-            demerit += 3;
-          else if (dot_move_dir != UP)
-            demerit += 2;
-        }
+      if (i->second.dir_
+          && dot_move_dir != i->second.dir_)
+        demerit += 2;
       else if (dot_move_dir != UP)
         demerit += 1;
 
index 82fea8b5ba1072c37a5d40ab3cfd64de89f12f43..3aeb328e8303597282f4f8946d30ffbc27375de4 100644 (file)
@@ -32,7 +32,6 @@ struct Dot_position
   Direction dir_;
   Grob *dot_;
   Box dot_extents_;
-  bool extremal_head_;
   Interval x_extent_;
 
   Dot_position ()
@@ -40,7 +39,6 @@ struct Dot_position
     dot_ = 0;
     pos_ = 0;
     dir_ = CENTER;
-    extremal_head_ = false;
   }
 };