From 65f33096c20eeaefdf87cc22e5d253c4aa4ac9e1 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 6 Jun 2012 23:49:18 -0700 Subject: [PATCH] Timeline: Avoid more complete redraws. --- timeline/src/Annotation_Point.H | 2 +- timeline/src/Control_Point.C | 2 +- timeline/src/Sequence_Widget.C | 3 +-- timeline/src/Sequence_Widget.H | 5 ++++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/timeline/src/Annotation_Point.H b/timeline/src/Annotation_Point.H index 5d59147..c7f29db 100644 --- a/timeline/src/Annotation_Point.H +++ b/timeline/src/Annotation_Point.H @@ -109,7 +109,7 @@ public: if ( m == FL_RELEASE ) { sequence()->sort(); - timeline->redraw(); + redraw(); } return r; diff --git a/timeline/src/Control_Point.C b/timeline/src/Control_Point.C index 5c7d97d..2d385d5 100644 --- a/timeline/src/Control_Point.C +++ b/timeline/src/Control_Point.C @@ -60,7 +60,7 @@ Control_Point::set ( Log_Entry &e ) if ( ! strcmp( s, ":y" ) ) _y = atof( v ); - timeline->redraw(); + redraw(); // _make_label(); } diff --git a/timeline/src/Sequence_Widget.C b/timeline/src/Sequence_Widget.C index de9e012..3fb5674 100644 --- a/timeline/src/Sequence_Widget.C +++ b/timeline/src/Sequence_Widget.C @@ -466,8 +466,7 @@ Sequence_Widget::handle ( int m ) // timeline->update_length( start() + length() ); /* FIXME: why isn't this enough? */ -// sequence()->redraw(); - timeline->redraw(); + sequence()->redraw(); } if ( ! selected() || _selection.size() == 1 ) diff --git a/timeline/src/Sequence_Widget.H b/timeline/src/Sequence_Widget.H index 79b56f6..6cfa5d2 100644 --- a/timeline/src/Sequence_Widget.H +++ b/timeline/src/Sequence_Widget.H @@ -267,13 +267,16 @@ public: virtual void redraw ( void ) { + if ( ! _sequence ) + return; + if ( ! (align() & FL_ALIGN_INSIDE) ) { // FIXME: to better.. _sequence->redraw(); } else - _sequence->damage( FL_DAMAGE_EXPOSE, x(), y(), w(), h() ); + _sequence->damage( FL_DAMAGE_ALL, x(), y(), w(), h() ); } virtual void draw_box ( void );