6213 |
"other Group. This is a bug, report it!" |
"other Group. This is a bug, report it!" |
6214 |
); |
); |
6215 |
// now move all samples of this group to the other group |
// now move all samples of this group to the other group |
6216 |
for (Sample* pSample = GetFirstSample(); pSample; pSample = GetNextSample()) { |
Sample* pSample; |
6217 |
|
while ((pSample = GetSample(0))) { |
6218 |
pOtherGroup->AddSample(pSample); |
pOtherGroup->AddSample(pSample); |
6219 |
} |
} |
6220 |
} |
} |
6956 |
* @param index - number of the sought group (0..n) |
* @param index - number of the sought group (0..n) |
6957 |
* @returns sought group or NULL if there's no such group |
* @returns sought group or NULL if there's no such group |
6958 |
*/ |
*/ |
6959 |
Group* File::GetGroup(uint index) { |
Group* File::GetGroup(size_t index) { |
6960 |
if (!pGroups) LoadGroups(); |
if (!pGroups) LoadGroups(); |
6961 |
GroupsIterator = pGroups->begin(); |
GroupsIterator = pGroups->begin(); |
6962 |
for (uint i = 0; GroupsIterator != pGroups->end(); i++) { |
for (size_t i = 0; GroupsIterator != pGroups->end(); i++) { |
6963 |
if (i == index) return *GroupsIterator; |
if (i == index) return *GroupsIterator; |
6964 |
++GroupsIterator; |
++GroupsIterator; |
6965 |
} |
} |
7008 |
if (iter == pGroups->end()) throw gig::Exception("Could not delete group, could not find given group"); |
if (iter == pGroups->end()) throw gig::Exception("Could not delete group, could not find given group"); |
7009 |
if (pGroups->size() == 1) throw gig::Exception("Cannot delete group, there must be at least one default group!"); |
if (pGroups->size() == 1) throw gig::Exception("Cannot delete group, there must be at least one default group!"); |
7010 |
// delete all members of this group |
// delete all members of this group |
7011 |
for (Sample* pSample = pGroup->GetFirstSample(); pSample; pSample = pGroup->GetNextSample()) { |
Sample* pSample; |
7012 |
|
while ((pSample = pGroup->GetSample(0))) { |
7013 |
DeleteSample(pSample); |
DeleteSample(pSample); |
7014 |
} |
} |
7015 |
// now delete this group object |
// now delete this group object |