]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.14
authorfred <fred>
Sun, 24 Mar 2002 19:57:14 +0000 (19:57 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:57:14 +0000 (19:57 +0000)
lily/include/tie-grav.hh
lily/tie-grav.cc
lily/translator-group.cc

index b967e42c197e33f271ea425742888fcbac9365b1..dc118c96e073fef0706212c786b5878e2f273618 100644 (file)
@@ -23,7 +23,7 @@ class Tie_engraver : public Engraver {
     Melodic_req  * melodic_req_l_;
     
 protected:
-    virtual ~Tie_engraver();
+    virtual void do_removal_processing ();
     virtual void acknowledge_element (Score_elem_info);
     virtual bool do_try_request (Request*);
     virtual bool acceptable_request_b (Request*);
index c7201bde2ead3dbb1ea175036788a15d886c7099..385de4ab05533934aed1df4bdef0e03ae8ff7913 100644 (file)
@@ -104,11 +104,14 @@ Tie_engraver::do_pre_move_processing()
     }
 }
 
-Tie_engraver::~Tie_engraver()
+void
+Tie_engraver::do_removal_processing ()
 {
+  do_pre_move_processing ();
   if (tie_p_) 
     {
       req_l_->warning ("unended Tie");
+      tie_p_->unlink ();
       delete tie_p_;
     }
 }
index cd7b6e62e9479ec963144b5f3711c119f8189373..c824164d5053eeae495f8ce68d4e377d7b97f5e7 100644 (file)
@@ -115,12 +115,17 @@ Translator_group::find_create_translator_l (String n, String id)
     return existing;
   
   Link_array<Translator_group> path = path_to_acceptable_translator (n);
-
-  if (path.size ())
+      
+  /* 
+        if path.size () == 1, then 
+        type_str_ == n, but not id == id_str_
+        */
+  if (path.size () > 1)
     {
+      assert (path.size () > 1);
       Translator_group * current = this;
 
-      // start at 1.  The first one will be us.
+      // start at 1.  The first one (index 0) will be us.
       for (int i=1; i < path.size (); i++) 
        {
          Translator_group * new_group = path[i]->clone ()->group_l ();
@@ -130,9 +135,8 @@ Translator_group::find_create_translator_l (String n, String id)
       current->id_str_ = id;
       return current;
     }
-
   
-  Translator_group *  ret =0;
+  Translator_group *ret = 0;
   if (daddy_trans_l_)
     ret = daddy_trans_l_->find_create_translator_l (n,id);
   else 
@@ -208,7 +212,14 @@ Translator *
 Translator_group::remove_translator_p (Translator*trans_l)
 {
   PCursor<Translator*> trans_cur (trans_p_list_.find (trans_l));
-  return trans_cur.remove_p();
+  Translator * t =  trans_cur.remove_p();
+  /*
+    For elegant design, we would do this too.  Alas, it does not work yet..
+    
+    t-> removal_processing ();
+  */
+  t-> daddy_trans_l_ = 0;
+  return t;
 }
 
 
@@ -314,9 +325,8 @@ Translator_group::do_removal_processing ()
 }
 
 void
-Translator_group::add_processing ()
+Translator_group::do_add_processing ()
 {
-  Translator::add_processing ();
    for (int i=0; i < consists_str_arr_.size(); i++) 
     {
       Translator * t = output_def_l ()->find_translator_l (consists_str_arr_[i]);