diff --git a/sequencer/src/canvas.C b/sequencer/src/canvas.C index 2c24200..119f3da 100644 --- a/sequencer/src/canvas.C +++ b/sequencer/src/canvas.C @@ -483,6 +483,13 @@ Canvas::draw_line ( int x, int flags ) m.current[ x ][ y ].flags |= flags; } +int +Canvas::playhead_moved ( void ) +{ + int x = m.grid->ts_to_x( m.grid->index() ); + + return m.playhead != x; +} /** draw only the playhead--without reexamining the grid */ int diff --git a/sequencer/src/canvas.H b/sequencer/src/canvas.H index 6f5cacd..16ab645 100644 --- a/sequencer/src/canvas.H +++ b/sequencer/src/canvas.H @@ -157,6 +157,7 @@ public: void notes ( char *s ); char * notes ( void ); void randomize_row ( int y ); + int playhead_moved ( void ); void start_cursor ( int x, int y ); void end_cursor ( int x, int y ); diff --git a/sequencer/src/gui/ui.fl b/sequencer/src/gui/ui.fl index 1caefc8..05486c7 100644 --- a/sequencer/src/gui/ui.fl +++ b/sequencer/src/gui/ui.fl @@ -1591,7 +1591,11 @@ _flags |= FL_DAMAGE_SCROLL;} {} } Function {draw_playhead( void )} {open return_type void } { - code {damage( FL_DAMAGE_USER1 );} {} + code { + if ( _c && _c->playhead_moved() ) + { + damage( FL_DAMAGE_USER1 ); + }} {} } Function {draw_border()} {open return_type void } {