@@ -856,6 +856,20 @@ Canvas::h_zoom ( float n ) | |||||
resize_grid(); | 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) */ | /** adjust vertical zoom (* n) */ | ||||
void | void | ||||
Canvas::v_zoom ( float n ) | Canvas::v_zoom ( float n ) | ||||
@@ -152,6 +152,7 @@ public: | |||||
void pan ( int dir, int n ); | void pan ( int dir, int n ); | ||||
void h_zoom ( float n ); | void h_zoom ( float n ); | ||||
void v_zoom ( float n ); | void v_zoom ( float n ); | ||||
void v_zoom_fit ( void ); | |||||
void notes ( char *s ); | void notes ( char *s ); | ||||
char * notes ( void ); | char * notes ( void ); | ||||
void randomize_row ( int y ); | void randomize_row ( int y ); | ||||
@@ -152,6 +152,8 @@ main ( int argc, char **argv ) | |||||
init_song(); | init_song(); | ||||
pattern::signal_create_destroy.connect( mem_fun( phrase_c, &Canvas::v_zoom_fit ) ); | |||||
if ( ! lash.init( &argc, &argv ) ) | if ( ! lash.init( &argc, &argv ) ) | ||||
WARNING( "error initializing LASH" ); | WARNING( "error initializing LASH" ); | ||||