This commit is contained in:
parent
09168784ee
commit
c73eb49581
2 changed files with 8 additions and 4 deletions
|
@ -628,8 +628,10 @@ bool Fluid::loadSoundFonts(const QStringList& sl)
|
|||
if (s.isEmpty())
|
||||
continue;
|
||||
QString path;
|
||||
QFileInfo fis(s);
|
||||
QString fileName = fis.fileName();
|
||||
foreach (const QFileInfo& fi, l) {
|
||||
if (fi.fileName() == s) {
|
||||
if (fi.fileName() == fileName) {
|
||||
path = fi.absoluteFilePath();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -401,13 +401,15 @@ bool Zerberus::loadInstrument(const QString& s)
|
|||
{
|
||||
if (s.isEmpty())
|
||||
return false;
|
||||
QFileInfo fis(s);
|
||||
QString fileName = fis.fileName();
|
||||
for (ZInstrument* instr : instruments) {
|
||||
if (QFileInfo(instr->path()).fileName() == s) { // already loaded?
|
||||
if (QFileInfo(instr->path()).fileName() == fileName) { // already loaded?
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (ZInstrument* instr : globalInstruments) {
|
||||
if (QFileInfo(instr->path()).fileName() == s) {
|
||||
if (QFileInfo(instr->path()).fileName() == fileName) {
|
||||
instruments.push_back(instr);
|
||||
instr->setRefCount(instr->refCount() + 1);
|
||||
if (instruments.size() == 1) {
|
||||
|
@ -422,7 +424,7 @@ bool Zerberus::loadInstrument(const QString& s)
|
|||
QFileInfoList l = Zerberus::sfzFiles();
|
||||
QString path;
|
||||
foreach (const QFileInfo& fi, l) {
|
||||
if (fi.fileName() == s) {
|
||||
if (fi.fileName() == fileName) {
|
||||
path = fi.absoluteFilePath();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue