]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.63
authorfred <fred>
Sun, 24 Mar 2002 19:43:18 +0000 (19:43 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:43:18 +0000 (19:43 +0000)
lily/staffline.cc

index c5e17bc7fc2cf62eed56d799ca497ddb0bb5cd39..c4d4861b8c29c07d23f3e74b227a90a3c1a052b1 100644 (file)
@@ -33,26 +33,34 @@ Line_of_staff::TeXstring() const
        iter_top(line_of_score_l_->cols,cc);
        Real lastpos=cc->hpos;
 
+       
        // all items in the current line & staff.
        for (; cc.ok(); cc++) {
-           Real delta=cc->hpos - lastpos;
-           lastpos = cc->hpos;
-
-           // moveover
-           if (delta)
-               s +=String( "\\kern ") + print_dimen(delta);
+           String chunk_str;
+           
+           Real delta  = cc->hpos - lastpos;
+           
+           
            if (cc->error_mark_b_) {
-               s += String("\\columnerrormark");
+               chunk_str += String("\\columnerrormark");
            }
            // now output the items.
            for (iter_top(cc->its,i); i.ok(); i++) {
                if (i->pstaff_l_ == pstaff_l_)
-                   s += i->TeXstring();
+                   chunk_str += i->TeXstring();
            }
            // spanners.
            for (iter_top(cc->starters,i); i.ok(); i++)
                if (i->pstaff_l_ == pstaff_l_)
-                   s += i->TeXstring();
+                   chunk_str += i->TeXstring();
+
+           if (chunk_str!="") {
+               // moveover
+               if (delta)
+                   s +=String( "\\kern ") + print_dimen(delta);
+               s += chunk_str;
+               lastpos = cc->hpos;
+           }
        }
     }
     s+="\\hss}\\vss}";