Small hack to fix one-pixel size difference when there are no annotation tracks.

This commit is contained in:
Jonathan Moore Liles 2008-05-05 21:56:26 -05:00
parent 8677b76201
commit f9d93f4307
2 changed files with 9 additions and 6 deletions

View File

@ -487,9 +487,6 @@ Timeline::resize ( int X, int Y, int W, int H )
void void
Timeline::draw ( void ) Timeline::draw ( void )
{ {
if ( ! visible_r() )
return;
int X, Y, W, H; int X, Y, W, H;
int bdx = 0; int bdx = 0;

View File

@ -207,17 +207,17 @@ Track::init ( void )
resizable( o ); resizable( o );
{ {
Fl_Pack *o = annotation = new Fl_Pack( width(), 0, pack->w(), 115 ); Fl_Pack *o = annotation = new Fl_Pack( width(), 0, pack->w(), 0 );
o->end(); o->end();
} }
{ {
Fl_Pack *o = control = new Fl_Pack( width(), 0, pack->w(), 115 ); Fl_Pack *o = control = new Fl_Pack( width(), 0, pack->w(), 0 );
o->end(); o->end();
} }
{ {
Fl_Pack *o = takes = new Fl_Pack( width(), 0, pack->w(), 115 ); Fl_Pack *o = takes = new Fl_Pack( width(), 0, pack->w(), 0 );
o->end(); o->end();
o->hide(); o->hide();
} }
@ -279,6 +279,12 @@ Track::resize ( void )
for ( int i = control->children(); i--; ) for ( int i = control->children(); i--; )
control->child( i )->size( w(), height() ); control->child( i )->size( w(), height() );
/* FIXME: hack! */
if ( annotation->children() )
annotation->show();
else
annotation->hide();
if ( _show_all_takes ) if ( _show_all_takes )
{ {
takes->show(); takes->show();