Timeline: Don't die when a punch recording is started with no range defined.
This commit is contained in:
parent
2861509b52
commit
15a78bbfb5
|
@ -40,7 +40,7 @@ Timeline::record ( void )
|
||||||
|
|
||||||
nframes_t frame = transport->frame;
|
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();
|
frame = range_start();
|
||||||
|
|
||||||
DMESSAGE( "Going to record starting at frame %lu", (unsigned long)frame );
|
DMESSAGE( "Going to record starting at frame %lu", (unsigned long)frame );
|
||||||
|
@ -64,7 +64,7 @@ Timeline::stop ( void )
|
||||||
{
|
{
|
||||||
nframes_t frame = transport->frame;
|
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();
|
frame = range_end();
|
||||||
|
|
||||||
for ( int i = tracks->children(); i-- ; )
|
for ( int i = tracks->children(); i-- ; )
|
||||||
|
|
|
@ -856,7 +856,7 @@ if ( engine && engine->zombified() && ! zombie )
|
||||||
|
|
||||||
solo_blinker->value( Track::soloing() );
|
solo_blinker->value( Track::soloing() );
|
||||||
|
|
||||||
if ( transport->punch_enabled() )
|
if ( transport->punch_enabled() && timeline->range_start() != timeline->range_end() )
|
||||||
rec_blinker->value( transport->rolling &&
|
rec_blinker->value( transport->rolling &&
|
||||||
transport->rec_enabled() &&
|
transport->rec_enabled() &&
|
||||||
transport->frame >= timeline->range_start() &&
|
transport->frame >= timeline->range_start() &&
|
||||||
|
|
|
@ -1068,8 +1068,7 @@ Timeline::redraw_playhead ( void )
|
||||||
|
|
||||||
if ( transport->rolling &&
|
if ( transport->rolling &&
|
||||||
transport->rec_enabled() &&
|
transport->rec_enabled() &&
|
||||||
transport->punch_enabled() &&
|
( ( transport->punch_enabled() && range_start() != range_end() ) && transport->frame > range_end() ) )
|
||||||
transport->frame > range_end() )
|
|
||||||
transport->stop();
|
transport->stop();
|
||||||
|
|
||||||
int playhead_x = ts_to_x( transport->frame );
|
int playhead_x = ts_to_x( transport->frame );
|
||||||
|
|
Loading…
Reference in New Issue