redraw playhead only if pixel position changed.

This commit is contained in:
Robin Gareus 2015-04-08 12:31:44 +02:00
parent 70a493d510
commit 85e701880b
1 changed files with 2 additions and 2 deletions

View 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);
}