View Issue Details

IDProjectCategoryView StatusLast Update
0001577ardourbugspublic2008-11-21 00:09
Reporteresaracco Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0001577: Region copying problem
Description[Last SVN trunk]

Right clicking on a region and choosing "Edition/Copy", automatically move the region to the beginning of the track.
TagsNo tags attached.

Activities

cth103

2007-03-26 15:39

administrator   ~0003666

Confirmed.

2007-04-06 18:39

 

1577.patch (1,051 bytes)   
Index: gtk2_ardour/editor_ops.cc
===================================================================
--- gtk2_ardour/editor_ops.cc	(revision 164)
+++ gtk2_ardour/editor_ops.cc	(working copy)
@@ -2730,6 +2730,10 @@
     PlaylistMapping (TimeAxisView* tvp) : tv (tvp) {}
 };
 
+
+/** Cut, copy or clear the selected regions.
+ * @param op Operation (Cut, Copy or Clear)
+ */
 void
 Editor::cut_copy_regions (CutCopyOp op)
 {
@@ -2819,7 +2823,7 @@
 		
 		boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>((*x)->region());
 		boost::shared_ptr<Region> _xx;
-		
+
 		switch (op) {
 		case Cut:
 			if (!ar) break;
@@ -2831,8 +2835,11 @@
 			
 		case Copy:
 			if (!ar) break;
-			
-			npl->add_region ((*x)->region(), (*x)->region()->position() - first_position);
+
+			/* make a copy of the region, otherwise the original one will
+			   get moved when it is added to npl */
+			_xx = RegionFactory::create ((*x)->region());
+			npl->add_region (_xx, (*x)->region()->position() - first_position);
 			break;
 			
 		case Clear:
1577.patch (1,051 bytes)   

cth103

2007-04-06 18:41

administrator   ~0003725

The attached patch fixes it for me, but will need to check with Paul that the fix is sensible.

paul

2007-04-06 22:47

administrator   ~0003737

modified version of carl's patch applied to my code.

Issue History

Date Modified Username Field Change
2007-03-25 12:35 esaracco New Issue
2007-03-26 15:39 cth103 Note Added: 0003666
2007-04-06 18:39 cth103 File Added: 1577.patch
2007-04-06 18:41 cth103 Note Added: 0003725
2007-04-06 18:41 cth103 Status new => feedback
2007-04-06 22:47 paul Status feedback => resolved
2007-04-06 22:47 paul Resolution open => fixed
2007-04-06 22:47 paul Assigned To => paul
2007-04-06 22:47 paul Note Added: 0003737
2008-11-21 00:09 seablade Status resolved => closed