lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dots in chords can not be moved Issue 1266 (issue 5174043)


From: percival . music . ca
Subject: Dots in chords can not be moved Issue 1266 (issue 5174043)
Date: Sun, 02 Oct 2011 10:08:54 +0000

Reviewers: ,

Message:
please review for Justin / seafire

Description:
Dots in chords can not be moved Issue 1266

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

Affected files:
  M lily/dot-column.cc
  M lily/dot-configuration.cc
  M lily/include/dot-configuration.hh


Index: lily/dot-column.cc
diff --git a/lily/dot-column.cc b/lily/dot-column.cc
index 46b13811be3c9c20c70826c9b13b195ee60064e0..3917b4d6431eddccb1e4d974596a7822f4085f8e 100644
--- a/lily/dot-column.cc
+++ b/lily/dot-column.cc
@@ -163,13 +163,7 @@ 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;
-
-          dp.x_extent_ = note->extent (commonx, X_AXIS);
-        }
+        dp.x_extent_ = note->extent (commonx, X_AXIS);

       int p = Staff_symbol_referencer::get_rounded_position (dp.dot_);

@@ -177,8 +171,7 @@ 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"));
+      dp.dir_ = to_dir (dp.dot_->get_property ("direction"));

       cfg.remove_collision (p);
       cfg[p] = dp;
Index: lily/dot-configuration.cc
diff --git a/lily/dot-configuration.cc b/lily/dot-configuration.cc
index fefb9834330e1418ff8966d4742b2a23b0414873..3059a4d6599b2f2db15895c86ae82ec7b0f96367 100644
--- a/lily/dot-configuration.cc
+++ b/lily/dot-configuration.cc
@@ -33,16 +33,11 @@ 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 += 3;
       else if (dot_move_dir != UP)
-        demerit += 1;
+        demerit += 2;

       t += demerit;
     }
Index: lily/include/dot-configuration.hh
diff --git a/lily/include/dot-configuration.hh b/lily/include/dot-configuration.hh index 82fea8b5ba1072c37a5d40ab3cfd64de89f12f43..3aeb328e8303597282f4f8946d30ffbc27375de4 100644
--- a/lily/include/dot-configuration.hh
+++ b/lily/include/dot-configuration.hh
@@ -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;
   }
 };






reply via email to

[Prev in Thread] Current Thread [Next in Thread]