Update phrase display when patterns are created/destroyed.

This commit is contained in:
Jonathan Moore Liles 2008-02-12 17:04:38 -06:00
parent d301578e54
commit 5ceed377fb
3 changed files with 17 additions and 0 deletions

View File

@ -856,6 +856,20 @@ Canvas::h_zoom ( float n )
resize_grid();
}
void
Canvas::v_zoom_fit ( void )
{
if ( ! m.grid )
return;
changed_mapping();
m.vp->h = m.maxh;
m.vp->y = 0;
resize_grid();
}
/** adjust vertical zoom (* n) */
void
Canvas::v_zoom ( float n )

View File

@ -152,6 +152,7 @@ public:
void pan ( int dir, int n );
void h_zoom ( float n );
void v_zoom ( float n );
void v_zoom_fit ( void );
void notes ( char *s );
char * notes ( void );
void randomize_row ( int y );

2
main.C
View File

@ -152,6 +152,8 @@ main ( int argc, char **argv )
init_song();
pattern::signal_create_destroy.connect( mem_fun( phrase_c, &Canvas::v_zoom_fit ) );
if ( ! lash.init( &argc, &argv ) )
WARNING( "error initializing LASH" );