Timeline: Don't do FL_DAMAGE_SCROLL unless the viewport has actually moved...
This commit is contained in:
parent
9667f98995
commit
9896970ed0
|
@ -995,9 +995,12 @@ Timeline::draw ( void )
|
|||
update_child( *rulers );
|
||||
fl_pop_clip();
|
||||
|
||||
if ( ! ( damage() & FL_DAMAGE_SCROLL ) )
|
||||
{
|
||||
fl_push_clip( tracks->x(), rulers->y() + rulers->h(), tracks->w(), h() - rulers->h() - hscroll->h() );
|
||||
update_child( *tracks );
|
||||
fl_pop_clip();
|
||||
}
|
||||
|
||||
update_child( *hscroll );
|
||||
update_child( *vscroll );
|
||||
|
@ -1009,8 +1012,6 @@ done:
|
|||
|
||||
_old_xposition = xoffset;
|
||||
_old_yposition = _yposition;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** draw a single cursor line at /frame/ with color /color/ using symbol routine /symbol/ for the cap */
|
||||
|
@ -1419,6 +1420,9 @@ Timeline::xposition ( int X )
|
|||
{
|
||||
xoffset = x_to_ts( X );
|
||||
|
||||
int dx = ts_to_x( _old_xposition ) - ts_to_x( xoffset );
|
||||
|
||||
if ( dx )
|
||||
damage( FL_DAMAGE_SCROLL );
|
||||
}
|
||||
|
||||
|
@ -1428,6 +1432,9 @@ Timeline::yposition ( int Y )
|
|||
{
|
||||
_yposition = Y;
|
||||
|
||||
int dy = _old_yposition - _yposition;
|
||||
|
||||
if ( dy )
|
||||
damage( FL_DAMAGE_SCROLL );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue