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.
(cherry picked from commit 4cad9517aa)
This commit is contained in:
Tobias Doerffel
2011-01-23 23:10:04 +01:00
parent 05590f1fb9
commit 5949f49e11
2 changed files with 7 additions and 1 deletions

View File

@@ -219,11 +219,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 )
{