]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/figured-bass-engraver.cc
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / lily / figured-bass-engraver.cc
index f9ed3329f19a9a469de3798032145fe9f6141859..2e2c519f7af88c7291d69d7c9ee2cfa1b891276c 100644 (file)
@@ -1,10 +1,21 @@
 /*
-  figured-bass-engraver.cc -- implement Figured_bass_engraver
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2005--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "engraver.hh"
@@ -31,6 +42,7 @@ struct Figure_group
   SCM augmented_;
   SCM diminished_;
   SCM augmented_slash_;
+  SCM text_;
   
   Item *figure_item_; 
   Stream_event *current_event_;
@@ -46,6 +58,7 @@ struct Figure_group
     augmented_ = SCM_EOL;
     diminished_ = SCM_EOL;
     augmented_slash_ = SCM_EOL;
+    text_ = SCM_EOL;
     group_ = 0;
     current_event_ = 0;
   }
@@ -63,7 +76,9 @@ struct Figure_group
       && ly_is_equal (diminished_,
                      current_event_->get_property ("diminished"))
       && ly_is_equal (augmented_slash_,
-                     current_event_->get_property ("augmented-slash"));
+                     current_event_->get_property ("augmented-slash"))
+      && ly_is_equal (text_,
+                     current_event_->get_property ("text"));
   }
 };
 
@@ -106,6 +121,7 @@ Figured_bass_engraver::derived_mark () const
       scm_gc_mark (groups_[i].augmented_);
       scm_gc_mark (groups_[i].diminished_);
       scm_gc_mark (groups_[i].augmented_slash_);
+      scm_gc_mark (groups_[i].text_);
     }
 }
 
@@ -177,10 +193,12 @@ Figured_bass_engraver::listen_bass_figure (Stream_event *ev)
   if (to_boolean (get_property ("useBassFigureExtenders")))
     {
       SCM fig = ev->get_property ("figure");
+      SCM txt = ev->get_property ("text");
       for (vsize i = 0; i < groups_.size (); i++)
        {
          if (!groups_[i].current_event_
-             && ly_is_equal (groups_[i].number_, fig))
+             && ly_is_equal (groups_[i].number_, fig)
+             && ly_is_equal (groups_[i].text_, txt))
            {
              groups_[i].current_event_ = ev;
              groups_[i].force_no_continuation_
@@ -366,6 +384,7 @@ Figured_bass_engraver::process_music ()
          groups_[i].augmented_ = SCM_BOOL_F;
          groups_[i].diminished_ = SCM_BOOL_F;
          groups_[i].augmented_slash_ = SCM_BOOL_F;
+         groups_[i].text_ = SCM_BOOL_F;
        }
     }
 
@@ -472,8 +491,9 @@ Figured_bass_engraver::create_grobs ()
          group.augmented_ = group.current_event_->get_property ("augmented");
          group.diminished_ = group.current_event_->get_property ("diminished");
          group.augmented_slash_ = group.current_event_->get_property ("augmented-slash");
+         group.text_ = group.current_event_->get_property ("text");
 
-         SCM text = group.current_event_->get_property ("text");
+         SCM text = group.text_;
          if (!Text_interface::is_markup (text)
              && ly_is_procedure (proc))
            {