]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-basic.cc
Doc-es: various updates.
[lilypond.git] / lily / spacing-basic.cc
index c6b0199eb3ca047559727ef1c199f7c782a5d867..ff245aa30fdd438b17efced4c3fa1ebc64eb28d2 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2005--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2005--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ Spacing_spanner::standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
 
   if (Paper_column::is_breakable (l) && Paper_column::is_breakable (r))
     {
-      Moment *dt = unsmob_moment (l->get_property ("measure-length"));
+      Moment *dt = unsmob<Moment> (l->get_property ("measure-length"));
       Moment mlen (1);
       if (dt)
         mlen = *dt;
@@ -91,7 +91,7 @@ get_measure_length (Grob *column)
 
   do
     {
-      if (Moment *len = unsmob_moment (cols[col_idx]->get_property ("measure-length")))
+      if (Moment *len = unsmob<Moment> (cols[col_idx]->get_property ("measure-length")))
         {
           return len;
         }
@@ -111,8 +111,8 @@ Spacing_spanner::note_spacing (Grob * /* me */,
   Moment shortest_playing_len = 0;
   SCM s = lc->get_property ("shortest-playing-duration");
 
-  if (unsmob_moment (s))
-    shortest_playing_len = *unsmob_moment (s);
+  if (unsmob<Moment> (s))
+    shortest_playing_len = *unsmob<Moment> (s);
 
   if (! shortest_playing_len.to_bool ())
     {
@@ -157,11 +157,11 @@ Spacing_spanner::note_spacing (Grob * /* me */,
       ret = Spring (fraction * len, fraction * min);
 
       // Stretch proportional to the space between canonical bare noteheads
-      ret.set_inverse_stretch_strength (fraction * max (0.0, (len - min)));
+      ret.set_inverse_stretch_strength (fraction * max (0.1, (len - min)));
     }
   else if (delta_t.grace_part_)
     {
-      Grob *grace_spacing = unsmob_grob (lc->get_object ("grace-spacing"));
+      Grob *grace_spacing = unsmob<Grob> (lc->get_object ("grace-spacing"));
       if (grace_spacing)
         {
           Spacing_options grace_opts;