Skip to content

Commit

Permalink
Update demos that have unused hidden automation tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
Veratil committed Jan 14, 2023
1 parent 3369f8e commit 6a7b7b5
Show file tree
Hide file tree
Showing 12 changed files with 572 additions and 574 deletions.
Binary file modified data/projects/demos/AngryLlama-NewFangled.mmpz
Binary file not shown.
Binary file modified data/projects/demos/CapDan/CapDan-ReggaeTry.mmpz
Binary file not shown.
Binary file modified data/projects/demos/CapDan/CapDan-ReggaetonTry.mmpz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified data/projects/demos/Farbro-Tectonic.mmpz
Binary file not shown.
Binary file modified data/projects/demos/Impulslogik-Zen.mmpz
Binary file not shown.
Binary file modified data/projects/demos/Skiessi/Skiessi-C64.mmpz
Binary file not shown.
Binary file modified data/projects/demos/Skiessi/Skiessi-Onion.mmpz
Binary file not shown.
Binary file not shown.
1,117 changes: 572 additions & 545 deletions data/projects/demos/StrictProduction-DearJonDoe.mmp

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions src/core/DataFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1615,35 +1615,6 @@ void DataFile::upgrade_1_3_0()
}
}

void DataFile::upgrade_noHiddenClipNames()
{
QDomNodeList tracks = elementsByTagName("track");

auto clearDefaultNames = [](QDomNodeList clips, QString trackName)
{
for (int j = 0; j < clips.size(); ++j)
{
QDomElement clip = clips.item(j).toElement();
QString clipName = clip.attribute("name", "");
if (clipName == trackName) { clip.setAttribute("name", ""); }
}
};

for (int i = 0; i < tracks.size(); ++i)
{
QDomElement track = tracks.item(i).toElement();
QString trackName = track.attribute("name", "");

QDomNodeList instClips = track.elementsByTagName("pattern");
QDomNodeList autoClips = track.elementsByTagName("automationpattern");
QDomNodeList bbClips = track.elementsByTagName("bbtco");

clearDefaultNames(instClips, trackName);
clearDefaultNames(autoClips, trackName);
clearDefaultNames(bbClips, trackName);
}
}

void DataFile::upgrade_noHiddenAutomationTracks()
{
// convert global automation tracks to non-hidden
Expand Down

0 comments on commit 6a7b7b5

Please sign in to comment.