View Issue Details

IDProjectCategoryView StatusLast Update
0001480ardourbugspublic2007-03-06 00:55
Reporteroofus Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformCentrino 1.6GHz LaptopOSLinuxOS VersionMandriva 2007
Summary0001480: Using ctrl+leftMouse to make a copy of a region, the original region disapears when the copy is dragged to a different track
DescriptionIf the copy is dragged to the same track the original doesn't disappear. The original only disappears when the region is dragged straight to another track without changing it's position in time. If there is any amount of movement in time before moving the copy to a new track, the original doesn't disappear.

If the original region is mono it will always reappears when the copy is dropped in it's new position. If the original region is stereo, it does not reappear when the copy is dropped in its new position.
TagsNo tags attached.

Activities

timbyr

2007-02-10 03:56

developer   ~0003197

I can reproduce this using svn rev 1442. The only part of the bug report I can't reproduce is "If the original region is stereo, it does not reappear when the copy is dropped in its new position", the stereo region always reappears for me.

cth103

2007-02-21 15:39

administrator   ~0003339

I think this is because the region copy only occurs once the move threshold has been reached, and this only happens when sufficient movement in x (ie time) has happened. For moves to the same time on a different track, the threshold is never reached and so the region copy in Editor::region_drag_motion_callback doesn't happen.

I attach a patch that fixes this. As usual I don't know if its the best solution.

2007-02-21 15:39

 

drag-copy-regions-patch (961 bytes)   
Index: gtk2_ardour/editor_mouse.cc
===================================================================
--- gtk2_ardour/editor_mouse.cc	(revision 1482)
+++ gtk2_ardour/editor_mouse.cc	(working copy)
@@ -1523,6 +1523,17 @@
 
 			drag_info.move_threshold_passed = (abs ((int) (drag_info.current_pointer_x - drag_info.grab_x)) > 4);
 			
+			/* if we are dragging Regions we must also consider a change in track
+			** as passing the move threshold, otherwise e.g. copying regions to
+			** the same temporal position on a different track doesn't work.
+			*/
+			if (drag_info.item_type == RegionItem) {
+				RegionView* rv = reinterpret_cast<RegionView *> (drag_info.data);
+				if (drag_info.last_trackview != &rv->get_time_axis_view()) {
+					drag_info.move_threshold_passed = true;
+				}
+			}
+			      
 			// and change the initial grab loc/frame if this drag info wants us to
 
 			if (drag_info.want_move_threshold && drag_info.move_threshold_passed) {
drag-copy-regions-patch (961 bytes)   

oofus

2007-02-27 01:24

developer   ~0003400

The patch was incorporated into SVN 1519. Unfortunately it has made no difference.

paul

2007-02-27 03:21

administrator   ~0003401

patch applied to svn, thanks very much.

oofus

2007-03-06 00:55

developer   ~0003516

The SVN 1555 Commit has fixed this. Is working fine.

Issue History

Date Modified Username Field Change
2007-02-08 20:15 oofus New Issue
2007-02-10 03:56 timbyr Note Added: 0003197
2007-02-10 03:56 timbyr Status new => confirmed
2007-02-21 15:39 cth103 Note Added: 0003339
2007-02-21 15:39 cth103 File Added: drag-copy-regions-patch
2007-02-27 01:24 oofus Note Added: 0003400
2007-02-27 03:21 paul Status confirmed => resolved
2007-02-27 03:21 paul Resolution open => fixed
2007-02-27 03:21 paul Assigned To => paul
2007-02-27 03:21 paul Note Added: 0003401
2007-03-06 00:55 oofus Status resolved => closed
2007-03-06 00:55 oofus Note Added: 0003516