Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recalculate the song length for every added TCO while loading #5236

Merged
merged 3 commits into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ void Song::playMidiClip( const MidiClip* midiClipToPlay, bool loop )

void Song::updateLength()
{
if (m_loadingProject) { return; }

m_length = 0;
m_tracksMutex.lockForRead();
for (auto track : tracks())
Expand Down Expand Up @@ -976,7 +978,7 @@ void Song::createNewProject()
QCoreApplication::instance()->processEvents();

m_loadingProject = false;

updateLength();
Engine::patternStore()->updateAfterTrackAdd();

Engine::projectJournal()->setJournalling( true );
Expand Down Expand Up @@ -1223,6 +1225,7 @@ void Song::loadProject( const QString & fileName )
}

m_loadingProject = false;
updateLength();
setModified(false);
m_loadOnLaunch = false;
}
Expand Down