diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2005-11-30 19:34:09 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2005-11-30 19:34:09 +0000 |
commit | 53d337a16882536876202324c9d68db6eba4eadf (patch) | |
tree | c3e95f2198356b7bb7fd0f48127c4d2f5c9c7340 /gtk2_ardour/editor_cursors.cc | |
parent | 327018191b2c9828cf377663fbce58b47744c237 (diff) |
more miscellaneous fixes to make things even nicer
git-svn-id: svn://localhost/trunk/ardour2@153 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_cursors.cc')
-rw-r--r-- | gtk2_ardour/editor_cursors.cc | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc index c868530476..c6551095c8 100644 --- a/gtk2_ardour/editor_cursors.cc +++ b/gtk2_ardour/editor_cursors.cc @@ -79,19 +79,20 @@ Editor::Cursor::set_position (jack_nframes_t frame) current_frame = frame; - if (new_pos == points.front().get_x()) { - - /* change in position is not visible, so just raise it */ - - canvas_item.raise_to_top(); - return; - } - - points.front().set_x(new_pos); - points.back().set_x(new_pos); + if (new_pos != points.front().get_x()) { + + points.front().set_x (new_pos); + points.back().set_x (new_pos); + + cerr << "new cursor points = " + << points.front().get_x() << ',' << points.front().get_y() + << " .. " + << points.back().get_x() << ',' << points.back().get_y() + << endl; + + canvas_item.property_points() = points; + } - // cerr << "set cursor2 al points, nc = " << points->num_points << endl; - canvas_item.property_points() = points; canvas_item.raise_to_top(); } @@ -99,8 +100,7 @@ void Editor::Cursor::set_length (double units) { length = units; - points.back().set_x (points.front().get_y() + length); - // cerr << "set cursor3 al points, nc = " << points->num_points << endl; + points.back().set_y (points.front().get_y() + length); canvas_item.property_points() = points; } @@ -108,7 +108,6 @@ void Editor::Cursor::set_y_axis (double position) { points.front().set_y (position); - points.back().set_x (position + length); - // cerr << "set cursor4 al points, nc = " << points->num_points << endl; + points.back().set_y (position + length); canvas_item.property_points() = points; } |