View Issue Details

IDProjectCategoryView StatusLast Update
0001840ardourbugspublic2009-10-29 23:36
Reporteroofus Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformCentrino 1.6GHz LaptopOSLinuxOS VersionMandriva 2007
Product Version2.0 
Summary0001840: [PATCH] Region gain lines slightly overhang their regions when drawn
DescriptionWhen using the gain tool, to edit a region gain envelope, the movement of the mouse cursor is not limited to the confines of the track it's being used in. It's possible to drag the mouse cursor all the way to the top of the canvas indicating a gain of 'large amounts' over the allowed 6dB.
TagsNo tags attached.

Activities

cth103

2009-10-21 01:12

administrator   ~0006822

This would appear to have been fixed. Can you confirm?

oofus

2009-10-21 09:23

developer   ~0006825

I would say partially fixed, but what's left may not be that important. The main issue of gain values greater than 6dB is fixed but two other minor issues remain.

1) The gain cursor can still be dragged outside of the region (not the gain line/envelope, but the mouse cursor) I would have thought when dragging the envelope the cursor would stay attached to the line and not be allowed to move any further than the line is.

2) When the envelope line is at it's highest value (+6dB) it is drawn one pixel above the border of the region.

2009-10-21 12:26

 

1840.patch (912 bytes)   
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index f231bfb..20310c4 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -455,7 +455,7 @@ AudioRegionView::set_height (gdouble height)
 				gain_line->show ();
 			}
 		}
-		gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE));
+		gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE - 2));
 	}
 
 	manage_zero_line ();
diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc
index 087ad59..d0b9564 100644
--- a/gtk2_ardour/region_gain_line.cc
+++ b/gtk2_ardour/region_gain_line.cc
@@ -44,6 +44,7 @@ AudioRegionGainLine::AudioRegionGainLine (const string & name, Session& s, Audio
 	  rv (r)
 {
 	group->raise_to_top ();
+	group->property_y () = 2;
 	set_verbose_cursor_uses_gain_mapping (true);
 	terminal_points_can_slide = false;
 }
1840.patch (912 bytes)   

cth103

2009-10-21 12:27

administrator   ~0006832

1. I don't think it's our business the be restricting the movement of the mouse cursor, but I'll look into this if anyone disagrees!

2. This should be fixed by the attached patch.

Thanks for testing!

oofus

2009-10-21 13:13

developer   ~0006835

Tested 3.0 and the line is now drawn correctly within the region boundary. Haven't checked the patch for 2.0.

Restricting the mouse cursor is possibly not worth the effort, was just a thought.

cth103

2009-10-22 02:00

administrator   ~0006850

Patch committed to 2.0-ongoing.

oofus

2009-10-29 23:36

developer   ~0006971

?

oofus

2009-10-29 23:36

developer   ~0006972

fixed

Issue History

Date Modified Username Field Change
2007-08-24 21:24 oofus New Issue
2009-10-21 01:12 cth103 Note Added: 0006822
2009-10-21 01:12 cth103 Status new => feedback
2009-10-21 09:23 oofus Note Added: 0006825
2009-10-21 12:26 cth103 File Added: 1840.patch
2009-10-21 12:27 cth103 Note Added: 0006832
2009-10-21 12:27 cth103 Status feedback => assigned
2009-10-21 12:27 cth103 Assigned To => paul
2009-10-21 12:28 cth103 cost => 0.00
2009-10-21 12:28 cth103 Summary When using the gain tool, the movement of the mouse cursor is not limited to the confines of the track it's being used in. => [PATCH] Region gain lines slightly overhang their regions when drawn
2009-10-21 13:13 oofus Note Added: 0006835
2009-10-22 02:00 cth103 Note Added: 0006850
2009-10-22 02:00 cth103 Status assigned => resolved
2009-10-22 02:00 cth103 Resolution open => fixed
2009-10-29 23:36 oofus Note Added: 0006971
2009-10-29 23:36 oofus Status resolved => feedback
2009-10-29 23:36 oofus Resolution fixed => reopened
2009-10-29 23:36 oofus Note Added: 0006972
2009-10-29 23:36 oofus Status feedback => closed
2009-10-29 23:36 oofus Resolution reopened => fixed