redraw playhead only if pixel position changed. 4.0-rc3
authorRobin Gareus <robin@gareus.org>
Wed, 8 Apr 2015 10:31:44 +0000 (12:31 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 8 Apr 2015 10:31:44 +0000 (12:31 +0200)
gtk2_ardour/editor_cursors.cc

index ee8253fed8dee27feb9f9d617ea8a22e77e6c8c8..7cd897604c0f3829949968c90da23f474b9581ea 100644 (file)
@@ -77,11 +77,11 @@ EditorCursor::~EditorCursor ()
 void
 EditorCursor::set_position (framepos_t frame)
 {
-       PositionChanged (frame);
+       if (_current_frame != frame) { PositionChanged (frame); }
 
        double const new_pos = _editor.sample_to_pixel_unrounded (frame);
 
-       if (new_pos != _track_canvas_item->x ()) {
+       if (rint(new_pos) != rint(_track_canvas_item->x ())) {
                _track_canvas_item->set_x (new_pos);
        }