View Issue Details

IDProjectCategoryView StatusLast Update
0001952ardourbugspublic2020-04-19 20:12
Reportersongshop Assigned Tosongshop  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionSVN/2.0-ongoing 
Summary0001952: cd,punch-in markers select bug
Descriptionwhen zoomed out if two markers are close together the right marker is always selected first; opposite to what you'd expect,and left marker is difficult to select at all.a real problem with cd track end/start markers which are directly next to each other.also makes expanding cd markers difficult and unintuitive.eg create a range, only the RH marker is selectable until it's moved away from the LH marker sufficiently then you can select the LH marker for moving. They should both be selectable at all times and moving the LH marker beyond the RH one should merely push it along the timeline.

g.
TagsNo tags attached.

Activities

2008-03-28 15:48

 

hsyl20_ardour_markers.patch (7,068 bytes)   
Index: gtk2_ardour/marker.h
===================================================================
--- gtk2_ardour/marker.h	(révision 3165)
+++ gtk2_ardour/marker.h	(copie de travail)
@@ -80,7 +80,6 @@
 	PublicEditor& editor;
 
 	ArdourCanvas::Group * _parent;
-	ArdourCanvas::Group *group;
 	ArdourCanvas::Polygon *mark;
 	ArdourCanvas::Text *text;
 	ArdourCanvas::Points *points;
@@ -91,7 +90,7 @@
 	nframes64_t   frame_position;
 	unsigned char shift; /* should be double, but its always small and integral */
 	Type         _type;
-	
+
 	void reposition ();
 };
 
Index: gtk2_ardour/marker.cc
===================================================================
--- gtk2_ardour/marker.cc	(révision 3165)
+++ gtk2_ardour/marker.cc	(copie de travail)
@@ -35,7 +35,6 @@
 	: editor (ed), _parent(&parent), _type(type)
 {
 	double label_offset = 0;
-	bool annotate_left = false;
 
 	/* Shapes we use:
 
@@ -139,7 +138,7 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));		
 		
 		shift = 3;
-		label_offset = 8.0;
+		label_offset = 4.0;
 		break;
 
 	case Tempo:
@@ -154,7 +153,7 @@
 		points->push_back (Gnome::Art::Point (3.0, 0.0));  		
 
 		shift = 3;
-		label_offset = 8.0;
+		label_offset = 4.0;
 		break;
 
 	case Start:
@@ -165,7 +164,7 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));	
 
 		shift = 0;
-		label_offset = 13.0;
+		label_offset = 7.5;
 		break;
 
 	case End:
@@ -176,8 +175,7 @@
 		points->push_back (Gnome::Art::Point (6.5, 6.5));		
 		
 		shift = 13;
-		label_offset = 6.0;
-		annotate_left = true;
+		label_offset = -7.5;
 		break;
 
 	case LoopStart:
@@ -188,7 +186,7 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));		
 		
 		shift = 0;
-		label_offset = 12.0;
+		label_offset = 14.0;
 		break;
 
 	case LoopEnd:
@@ -199,8 +197,7 @@
 		points->push_back (Gnome::Art::Point (13.0, 0.0));
 		
 		shift = 13;
-		label_offset = 0.0;
-		annotate_left = true;
+		label_offset = -1.0;
 		break;
 
 	case  PunchIn:
@@ -211,19 +208,18 @@
 		points->push_back (Gnome::Art::Point (0.0, 0.0));	
 
 		shift = 0;
-		label_offset = 13.0;
+		label_offset = 14.0;
 		break;
 		
 	case  PunchOut:
 		points = new ArdourCanvas::Points ();
 		points->push_back (Gnome::Art::Point (0.0, 0.0));
-		points->push_back (Gnome::Art::Point (12.0, 0.0));			
-		points->push_back (Gnome::Art::Point (12.0, 12.0));		
+		points->push_back (Gnome::Art::Point (13.0, 0.0));			
+		points->push_back (Gnome::Art::Point (13.0, 13.0));		
 		points->push_back (Gnome::Art::Point (0.0, 0.0));		
 
 		shift = 13;
-		label_offset = 0.0;
-		annotate_left = true;
+		label_offset = -0.0;
 		break;
 		
 	}
@@ -233,38 +229,34 @@
 
 	/* adjust to properly locate the tip */
 
-	unit_position -= shift;
+	text = new Text (parent);
+	text->lower_to_bottom();
+	text->raise(1);
+	text->property_anchor() = Gtk::ANCHOR_NW;
+	text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
+	text->property_text() = "";
+	text->move (unit_position + label_offset, 0.0);
 
-	group = new Group (parent, unit_position, 1.0);
+	Pango::FontDescription* font = get_font_for_style (N_("MarkerText"));
+	text->property_font_desc() = *font;
+	delete font;	
 
-	mark = new Polygon (*group);
+	set_name(annotation.c_str());
+
+	mark = new Polygon (parent);
+	mark->move(unit_position - shift, 1.0);
 	mark->property_points() = *points;
 	mark->property_fill_color_rgba() = rgba;
 	mark->property_outline_color_rgba() = rgba;
 	mark->property_width_pixels() = 1;
-	Pango::FontDescription* font = get_font_for_style (N_("MarkerText"));
+	mark->raise_to_top();
 
-	text = new Text (*group);
-	text->property_text() = annotation.c_str();
-	text->property_font_desc() = *font;
-
-	delete font;
-	
-	if (annotate_left) {
-		text->property_x() = -(text->property_text_width());
-	} else {
-		text->property_x() = label_offset;
-	}
-	text->property_y() = 0.0;
-	text->property_anchor() = Gtk::ANCHOR_NW;
-	text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
-
 	editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
 
 	mark->set_data ("marker", this);
 
 	if (handle_events) {
-		group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+		mark->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
 	}
 
 	line = 0;
@@ -276,7 +268,6 @@
 {
 	drop_references ();
 
-	/* destroying the parent group destroys its contents, namely any polygons etc. that we added */
 	delete text;
 	delete mark;
 	delete points;
@@ -289,7 +280,6 @@
 
 void Marker::reparent(ArdourCanvas::Group & parent)
 {
-	group->reparent(parent);
 	_parent = &parent;
 }
 
@@ -310,9 +300,9 @@
 
 		line = new ArdourCanvas::SimpleLine (*group);
 		line->property_color_rgba() = ARDOUR_UI::config()->canvasvar_EditPoint.get();
-		line->property_x1() = unit_position + shift;
+		line->property_x1() = unit_position;
 		line->property_y1() = y_origin;
-		line->property_x2() = unit_position + shift;
+		line->property_x2() = unit_position;
 		line->property_y2() = y_origin + initial_height;
 
 		line->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
@@ -347,9 +337,13 @@
 void
 Marker::set_name (const string& name)
 {
+	double old_width = text->property_text_width();
 	text->property_text() = name.c_str();
-	if (_type == End) {
-	  text->property_x() = -(text->property_text_width());
+
+	bool annotate_left = ((_type == End) || (_type == LoopEnd) || (_type == PunchOut));
+
+	if (annotate_left) {
+		text->move(old_width - text->property_text_width(), 0.0);
 	}
 }
 
@@ -357,14 +351,14 @@
 Marker::set_position (nframes_t frame)
 {
 	double new_unit_position = editor.frame_to_unit (frame);
-	new_unit_position -= shift;
-	group->move (new_unit_position - unit_position, 0.0);
+	mark->move (new_unit_position - unit_position, 0.0);
+	text->move (new_unit_position - unit_position, 0.0);
 	frame_position = frame;
 	unit_position = new_unit_position;
 
 	if (line) {
-		line->property_x1() = unit_position + shift;
-		line->property_x2() = unit_position + shift;
+		line->property_x1() = unit_position;
+		line->property_x2() = unit_position;
 	}
 }
 
@@ -377,13 +371,15 @@
 void
 Marker::show ()
 {
-        group->show();
+	mark->show();
+	text->show();
 }
 
 void
 Marker::hide ()
 {
-	group->hide();
+	mark->hide();
+	text->hide();
 }
 
 void
@@ -401,7 +397,8 @@
 	  _tempo (temp)
 {
 	set_position (_tempo.frame());
-	group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
+	mark->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
+
 }
 
 TempoMarker::~TempoMarker ()
@@ -416,7 +413,8 @@
 	  _meter (m)
 {
 	set_position (_meter.frame());
-	group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
+	mark->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
+
 }
 
 MeterMarker::~MeterMarker ()
hsyl20_ardour_markers.patch (7,068 bytes)   

hsyl20

2008-03-28 15:52

reporter   ~0004817

I have uploaded a patch for the 2.0-ongoing which allows marker labels (text) to always be displayed under marker "symbols".

This does NOT fix "moving the LH marker beyond the RH one should merely push it along the timeline".

cth103

2009-10-20 17:59

administrator   ~0006774

Last edited: 2009-10-20 18:00

Unfortunately things have changed rather from when this patch was written... can you describe what it does?

2009-10-20 21:33

 

hsyl20

2009-10-20 21:41

reporter   ~0006793

My patch was correcting the bug showed in video ardour_markers.avi (basically marker text was always displayed under the maker "symbols" with this patch).

songshop

2014-01-04 01:17

reporter   ~0015539

no longer an issue

system

2020-04-19 20:12

developer   ~0021577

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2007-11-10 21:31 songshop New Issue
2008-03-28 15:48 hsyl20 File Added: hsyl20_ardour_markers.patch
2008-03-28 15:52 hsyl20 Note Added: 0004817
2009-10-20 17:59 cth103 Note Added: 0006774
2009-10-20 18:00 cth103 Note Edited: 0006774
2009-10-20 18:00 cth103 Status new => feedback
2009-10-20 21:33 hsyl20 File Added: ardour_markers.avi
2009-10-20 21:41 hsyl20 Note Added: 0006793
2014-01-04 01:17 songshop Note Added: 0015539
2014-01-04 01:17 songshop Status feedback => resolved
2014-01-04 01:17 songshop Resolution open => fixed
2014-01-04 01:17 songshop Assigned To => songshop
2020-04-19 20:12 system Note Added: 0021577
2020-04-19 20:12 system Status resolved => closed