]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar.cc
release: 1.1.53
[lilypond.git] / lily / bar.cc
index 1d572e235e8ec5baca5fa4c906c22b1d18e8ccf5..913c2c72ed1c0622c0107c4ef11829ec30fef4af 100644 (file)
@@ -24,21 +24,23 @@ void
 Bar::do_print () const
 {
 #ifndef NPRINT
-    //  DOUT << type_str_; "{[" confuse  indenter.
+  String s = type_str_;
+  DOUT << "type = " << s;
 #endif
 }
 
 Real
 Bar::get_bar_size () const
 {
-  return paper_l ()->get_var ("barsize");
+  // Never called!
+  return 0;
 }
 
 
 Molecule*
 Bar::do_brew_molecule_p () const
 {    
-  Molecule *output = new Molecule (lookup_l ()->bar (type_str_, get_bar_size ()));
+  Molecule *output = new Molecule (lookup_l ()->bar (type_str_, get_bar_size (), paper_l ()));
   
   return output;
 }
@@ -51,14 +53,14 @@ static char const *bar_breaks[][3] ={
   {":|", ":|:", "|:"},
   {"|", "|", ""},
   {"", "|s", "|"},
-  {"", "|:", "|:"},
+  {"|", "|:", "|:"},
   {"|.", "|.", ""},
   {":|", ":|", ""},
   {"||", "||", ""},
   {".|.", ".|.", ""},
   {"", "scorebar", "scorepostbreak"},
-  {"", "{", "{"},
-  {"", "[", "["},  
+  {"", "brace", "brace"},
+  {"", "bracket", "bracket"},  
   {0,0,0}
 };
 
@@ -70,12 +72,16 @@ Bar::do_pre_processing ()
       if (bar_breaks[i][1] == type_str_)
        {
          type_str_ = bar_breaks[i][break_status_dir ()+1];
-         if (remove_elt_property (at_line_start_scm_sym)!= SCM_BOOL_F
-             && (break_status_dir () == RIGHT) && (type_str_ == ""))
-           {
-             type_str_ = "|";
-           }
+         break;
        }
     }
+  if (remove_elt_property (at_line_start_scm_sym)!= SCM_BOOL_F
+      && (break_status_dir () == RIGHT) && (type_str_ == ""))
+    {
+      type_str_ = "|";
+    }
+
+  if (type_str_ =="")
+    dim_cache_[X_AXIS]->set_empty (true);
 }