Add BB track when adding track to empty BB editor

When there's no BB track but a track is added to the BB editor,
automatically create a BB track so that the user doesn't get confused
by new empty track (not even showing clickable beats).

Partially closes #3149779.
This commit is contained in:
Tobias Doerffel
2011-01-23 23:10:04 +01:00
parent a494f4b160
commit 4cad9517aa
2 changed files with 7 additions and 1 deletions

View File

@@ -215,11 +215,12 @@ public slots:
void clearProject();
void addBBTrack();
private slots:
void insertBar();
void removeBar();
void addBBTrack();
void addSampleTrack();
void addAutomationTrack();

View File

@@ -83,6 +83,11 @@ bool bbTrackContainer::play( midiTime _start, fpp_t _frames,
void bbTrackContainer::updateAfterTrackAdd()
{
if( numOfBBs() == 0 && !engine::getSong()->isLoadingProject() )
{
engine::getSong()->addBBTrack();
}
// make sure, new track(s) have TCOs for every beat/bassline
for( int i = 0; i < qMax<int>( 1, numOfBBs() ); ++i )
{