Timeline: Don't die when a punch recording is started with no range defined.

This commit is contained in:
Jonathan Moore Liles 2012-10-05 14:19:21 -07:00
parent 2861509b52
commit 15a78bbfb5
3 changed files with 4 additions and 5 deletions

View File

@ -40,7 +40,7 @@ Timeline::record ( void )
nframes_t frame = transport->frame;
if ( transport->punch_enabled() && frame < range_start() )
if ( transport->punch_enabled() && range_start() != range_end() && frame < range_start() )
frame = range_start();
DMESSAGE( "Going to record starting at frame %lu", (unsigned long)frame );
@ -64,7 +64,7 @@ Timeline::stop ( void )
{
nframes_t frame = transport->frame;
if ( transport->punch_enabled() && frame > range_end() )
if ( transport->punch_enabled() && range_start() != range_end() && frame > range_end() )
frame = range_end();
for ( int i = tracks->children(); i-- ; )

View File

@ -856,7 +856,7 @@ if ( engine && engine->zombified() && ! zombie )
solo_blinker->value( Track::soloing() );
if ( transport->punch_enabled() )
if ( transport->punch_enabled() && timeline->range_start() != timeline->range_end() )
rec_blinker->value( transport->rolling &&
transport->rec_enabled() &&
transport->frame >= timeline->range_start() &&

View File

@ -1068,8 +1068,7 @@ Timeline::redraw_playhead ( void )
if ( transport->rolling &&
transport->rec_enabled() &&
transport->punch_enabled() &&
transport->frame > range_end() )
( ( transport->punch_enabled() && range_start() != range_end() ) && transport->frame > range_end() ) )
transport->stop();
int playhead_x = ts_to_x( transport->frame );