diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-21 02:39:12 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-21 02:39:12 +0000 |
commit | 767984b486086e3682e521179c2fb8364b3bba76 (patch) | |
tree | 3a03250848c776c0edf0de4df4a3d89397711c21 /gtk2_ardour/editor_ops.cc | |
parent | 6525aaeb70ed7dcaf068e641dc04b4f7c5ba61e4 (diff) |
probably fix cleanup issues, but testing required
git-svn-id: svn://localhost/ardour2/trunk@1632 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index ba874fc7cf..e6c5790133 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2811,19 +2811,21 @@ Editor::cut_copy_regions (CutCopyOp op) } boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>((*x)->region()); + boost::shared_ptr<Region> _xx; switch (op) { case Cut: if (!ar) break; - npl->add_region (RegionFactory::create (ar), (*x)->region()->position() - first_position); + _xx = RegionFactory::create ((*x)->region()); + npl->add_region (_xx, (*x)->region()->position() - first_position); pl->remove_region (((*x)->region())); break; case Copy: if (!ar) break; - npl->add_region (RegionFactory::create (ar), (*x)->region()->position() - first_position); + npl->add_region ((*x)->region(), (*x)->region()->position() - first_position); break; case Clear: @@ -2843,10 +2845,11 @@ Editor::cut_copy_regions (CutCopyOp op) foo.push_back ((*i).pl); } + if (!foo.empty()) { cut_buffer->set (foo); } - + for (set<PlaylistState, lt_playlist>::iterator pl = freezelist.begin(); pl != freezelist.end(); ++pl) { (*pl).playlist->thaw (); session->add_command (new MementoCommand<Playlist>(*(*pl).playlist, (*pl).before, &(*pl).playlist->get_state())); |