]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.0.8
authorfred <fred>
Sun, 24 Mar 2002 20:14:15 +0000 (20:14 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:14:15 +0000 (20:14 +0000)
input/test/defaultbars.ly [new file with mode: 0644]
lily/bar-engraver.cc

diff --git a/input/test/defaultbars.ly b/input/test/defaultbars.ly
new file mode 100644 (file)
index 0000000..3a2dcd9
--- /dev/null
@@ -0,0 +1,7 @@
+
+\score {
+       \melodic {
+               \property Staff.barAlways = "1"
+               \property Staff.defaultBarType = ":|:"
+               c4 c4 c4 c4 }
+}
index 7ed4bad8718d1c8f963ac5ac4423d9bbcefbc898..78721871b1b5da420a5bdcf91178b450a149add6 100644 (file)
@@ -42,6 +42,11 @@ Bar_engraver::create_bar ()
     {
       bar_p_ = new Bar;
       bar_p_->break_priority_i_  = 0;
+      String default_type = get_property ("defaultBarType");
+      if (default_type.length_i ())
+       {
+         bar_p_->type_str_ = default_type;
+       }
       announce_element (Score_element_info (bar_p_, bar_req_l_));
     }
 }
@@ -77,9 +82,12 @@ Bar_engraver::do_process_requests()
   else 
     {
       Time_description const *time = get_staff_info().time_C_;
-      if (time && !time->whole_in_measure_) 
+      String always = get_property ("barAlways");
+      if ((time && !time->whole_in_measure_) || always.length_i ()) 
        create_bar ();
     }
+
+  
   
   if (!bar_p_)
     {