| 74 | if (*replace != -1) |
| 75 | { |
| 76 | foreach (int j, sm->getSiblings(id)) |
| 77 | { |
| 78 | id.indexElt = j; |
| 79 | if (nChannels == 2) |
| 80 | { |
| 81 | if (sm->getQstr(id, champ_name).compare(nom.left(19).append("L")) == 0) |
| 82 | { |
| 83 | indexL = j; |
| 84 | qStr3 = QObject::tr("Sample \"%1L\" already exists.<br />Replace?").arg(nom.left(19)); |
| 85 | } |
| 86 | else if (sm->getQstr(id, champ_name).compare(nom.left(19).append("R")) == 0) |
| 87 | { |
| 88 | indexR = j; |
| 89 | qStr3 = QObject::tr("Sample \"%1R\" already exists.<br />Replace?").arg(nom.left(19)); |
| 90 | } |
| 91 | } |
| 92 | else |
| 93 | { |
| 94 | if (sm->getQstr(id, champ_name).compare(nom.left(20)) == 0) |
| 95 | { |
| 96 | indexL = j; |
| 97 | qStr3 = QObject::tr("Sample \"%1\" already exists.<br />Replace?").arg(nom.left(20)); |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | if (*replace != 2 && *replace != 4 && (indexL != -1 || indexR != -1)) |
| 102 | { |
| 103 | // Replacement? |