make selected marker line resize as canvas size changes

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2752 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-12-08 22:51:23 +00:00
parent 47b51a8924
commit fa2ca97d77
3 changed files with 14 additions and 0 deletions

View file

@ -316,6 +316,10 @@ Editor::track_canvas_size_allocated ()
if (playhead_cursor) playhead_cursor->set_length (canvas_height);
for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
(*x)->set_line_length (canvas_height);
}
// EDIT CURSOR XXX set line height for selected markers here
if (range_marker_drag_rect) {

View file

@ -293,6 +293,15 @@ void Marker::reparent(ArdourCanvas::Group & parent)
_parent = &parent;
}
void
Marker::set_line_length (double len)
{
if (line) {
line_points->back().set_y (len);
line->property_points() = *line_points;
}
}
void
Marker::add_line (ArdourCanvas::Group* group, double initial_height)
{

View file

@ -60,6 +60,7 @@ class Marker : public PBD::Destructible
void add_line (ArdourCanvas::Group*, double initial_height);
void show_line ();
void hide_line ();
void set_line_length (double);
void set_position (nframes_t);
void set_name (const string&);