]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-engraver.cc
formatting nits
[lilypond.git] / lily / bar-engraver.cc
index 85c98ead9c961ae532a73377b2e942efd96f3c0f..ce456c8963cf5bf4571adc039ca37866854db659 100644 (file)
@@ -8,6 +8,7 @@
 */
 
 #include "bar-line.hh"
+#include "context.hh"
 #include "score-engraver.hh"
 #include "warn.hh"
 #include "item.hh"
@@ -21,7 +22,7 @@ class Bar_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Bar_engraver);
-  void request_bar (std::string type_string);
+  void request_bar (string type_string);
 
 protected:
   virtual void finalize ();
@@ -89,8 +90,7 @@ void
 Bar_engraver::stop_translation_timestep ()
 {
   if (!bar_)
-    /* guh. Use properties! */
-    get_score_engraver ()->forbid_breaks ();
+    context ()->get_score_context ()->set_property ("forbidBreak", SCM_BOOL_T);
   else
     typeset_bar ();
 }
@@ -99,6 +99,5 @@ ADD_TRANSLATOR (Bar_engraver,
                /* doc */ "Create barlines. This engraver is controlled through the "
                "@code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point",
                /* create */ "BarLine",
-               /* accept */ "",
                /* read */ "whichBar",
-               /* write */ "");
+               /* write */ "forbidBreak");