nrosenstein-c4d / c4d-container-object

Isolate rigs in a single object with custom icon.
GNU Lesser General Public License v3.0
11 stars 3 forks source link

Null2Container/Container2Null only keeps first Tag/Track/etc. #14

Closed NiklasRosenstein closed 8 years ago

NiklasRosenstein commented 8 years ago

This is due to a bug in CopyBranchesTo():

      // ...
      if (valid)
      {
        // Now copy the source branch to the destination branch.
        if (move_dont_copy)
        {
          GeListNode* node = branch_src.head->GetFirst();
          if (node)
          {
            if (doc_src) doc_src->AddUndo(UNDOTYPE_DELETE, node);
            if (doc_dst) doc_dst->AddUndo(UNDOTYPE_NEW, node);
            node->Remove();  // <--------------------- HERE
            branch_dst.head->InsertLast(node);
          }
        }
        else
        {
          if (doc_dst)
            doc_dst->AddUndo(UNDOTYPE_CHANGE, branch_dst.head);
          branch_src.head->CopyTo(branch_dst.head, flags, at);
        }
        break;
      }