Make zoom-fit menu item work.
This commit is contained in:
parent
0da462b62d
commit
0645c0ebbf
|
@ -34,7 +34,7 @@ decl {\#include <FL/Fl.H>} {}
|
|||
decl {extern char *user_config_dir;} {global
|
||||
}
|
||||
|
||||
class TLE {open selected
|
||||
class TLE {open
|
||||
} {
|
||||
decl {Fl_Color system_colors[3];} {public
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ free( path );} {}
|
|||
label {Non-DAW - Timeline} open
|
||||
xywh {577 94 1024 768} type Double resizable xclass {Non-DAW} visible
|
||||
} {
|
||||
Fl_Menu_Bar menubar {
|
||||
Fl_Menu_Bar menubar {open
|
||||
xywh {0 0 1024 25}
|
||||
} {
|
||||
Submenu {} {
|
||||
|
@ -227,6 +227,7 @@ exit( 0 );}
|
|||
}
|
||||
MenuItem {} {
|
||||
label {&Fit}
|
||||
callback {timeline->zoom_fit();} selected
|
||||
xywh {10 10 40 25} divider
|
||||
}
|
||||
MenuItem {} {
|
||||
|
|
|
@ -1073,6 +1073,12 @@ Timeline::zoom ( float secs )
|
|||
redraw();
|
||||
}
|
||||
|
||||
void
|
||||
Timeline::zoom_fit ( void )
|
||||
{
|
||||
zoom( _length / (float)sample_rate() );
|
||||
}
|
||||
|
||||
Track *
|
||||
Timeline::track_by_name ( const char *name )
|
||||
{
|
||||
|
|
|
@ -181,7 +181,7 @@ public:
|
|||
void zoom ( float secs );
|
||||
void zoom_in ( void );
|
||||
void zoom_out ( void );
|
||||
|
||||
void zoom_fit ( void );
|
||||
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue