4181 |
* @param pGroup - script's new group |
* @param pGroup - script's new group |
4182 |
*/ |
*/ |
4183 |
void Script::SetGroup(ScriptGroup* pGroup) { |
void Script::SetGroup(ScriptGroup* pGroup) { |
4184 |
if (this->pGroup = pGroup) return; |
if (this->pGroup == pGroup) return; |
4185 |
if (pChunk) |
if (pChunk) |
4186 |
pChunk->GetParent()->MoveSubChunk(pChunk, pGroup->pList); |
pChunk->GetParent()->MoveSubChunk(pChunk, pGroup->pList); |
4187 |
this->pGroup = pGroup; |
this->pGroup = pGroup; |
4673 |
|
|
4674 |
// move this instrument within the instrument list |
// move this instrument within the instrument list |
4675 |
{ |
{ |
4676 |
DLS::File::InstrumentList& list = *pFile->pInstruments; |
File::InstrumentList& list = *pFile->pInstruments; |
4677 |
|
|
4678 |
DLS::File::InstrumentList::iterator itFrom = |
File::InstrumentList::iterator itFrom = |
4679 |
std::find(list.begin(), list.end(), static_cast<DLS::Instrument*>(this)); |
std::find(list.begin(), list.end(), static_cast<DLS::Instrument*>(this)); |
4680 |
|
|
4681 |
DLS::File::InstrumentList::iterator itTo = |
File::InstrumentList::iterator itTo = |
4682 |
std::find(list.begin(), list.end(), static_cast<DLS::Instrument*>(dst)); |
std::find(list.begin(), list.end(), static_cast<DLS::Instrument*>(dst)); |
4683 |
|
|
4684 |
list.splice(itTo, list, itFrom); |
list.splice(itTo, list, itFrom); |