]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam.cc
(calc_direction): take dir from visible stem in
[lilypond.git] / lily / beam.cc
index 712c4d5c04f87fbd29e62f043d58df22031a2ea6..bb48a4572db7fa08ab7ed702a2cc301b6115b044 100644 (file)
@@ -140,16 +140,18 @@ Beam::calc_direction (SCM smob)
          me->suicide ();
          return SCM_UNSPECIFIED;
        }
-      else
+      else 
        {
-         d = to_dir (stems[0]->get_property ("default-direction"));
+         Grob *stem = first_visible_stem (me);
+         d = to_dir (stem->get_property ("default-direction"));
        }
     }
 
-  
   if (count >= 1)
     {
-      d = get_default_dir (me);
+      if (!d)
+       d = get_default_dir (me);
+      
       consider_auto_knees (me);
     }