Revert "editor_pt_import: Process wav indexes once only"

This reverts commit 7422ffe692.
This commit is contained in:
Damien Zammit 2017-11-18 15:27:37 +11:00
parent 18306f3d37
commit 0073206508

View file

@ -192,16 +192,11 @@ Editor::do_ptimport (std::string ptpath,
return; return;
} }
vector<uint16_t> indexes;
vector<uint16_t>::iterator used_idx;
for (vector<PTFFormat::region_t>::iterator a = ptf.regions.begin(); for (vector<PTFFormat::region_t>::iterator a = ptf.regions.begin();
a != ptf.regions.end(); ++a) { a != ptf.regions.end(); ++a) {
for (vector<ptflookup_t>::iterator p = ptfwavpair.begin(); for (vector<ptflookup_t>::iterator p = ptfwavpair.begin();
p != ptfwavpair.end(); ++p) { p != ptfwavpair.end(); ++p) {
if ((p->index1 == a->wave.index) && (strcmp(a->wave.filename.c_str(), "") != 0)) {
used_idx = std::find(indexes.begin(), indexes.end(), a->wave.index);
if ((p->index1 == a->wave.index) && (strcmp(a->wave.filename.c_str(), "") != 0) && used_idx == indexes.end()) {
for (SourceList::iterator x = imported.begin(); for (SourceList::iterator x = imported.begin();
x != imported.end(); ++x) { x != imported.end(); ++x) {
if ((*x)->id() == p->id) { if ((*x)->id() == p->id) {
@ -228,7 +223,6 @@ Editor::do_ptimport (std::string ptpath,
ptfregpair.push_back(rp); ptfregpair.push_back(rp);
} }
} }
indexes.push_back(a->wave.index);
} }
} }
if (strcmp(a->wave.filename.c_str(), "") == 0) { if (strcmp(a->wave.filename.c_str(), "") == 0) {