[Igarden-commit] Garden/source/Document ClientDocument.cp, 1.37.2.5, 1.37.2.6
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2007-01-05 04:19:10
|
Update of /cvsroot/igarden/Garden/source/Document In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20279 Modified Files: Tag: Release_branch_v1 ClientDocument.cp Log Message: Fix problem where materials could should up multiply referenced if referenced once without a name and once with. If either name is missing on compare, use UID to match. Index: ClientDocument.cp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/ClientDocument.cp,v retrieving revision 1.37.2.5 retrieving revision 1.37.2.6 diff -C2 -d -r1.37.2.5 -r1.37.2.6 *** ClientDocument.cp 12 Dec 2006 01:15:40 -0000 1.37.2.5 --- ClientDocument.cp 5 Jan 2007 04:19:09 -0000 1.37.2.6 *************** *** 896,913 **** for(n = 0, found = false; n < count; n++) { ! numEntries = _materialRefs[n].rows.Length(); ! if(ref.name != NULL) { ! if(_materialRefs[n].isCanonical == ref.isCanonical && _materialRefs[n].name != NULL && String(_materialRefs[n].name) == str) { found = true; for(entry = 0, rowFound = false; entry < numEntries && !rowFound; entry++) { ! if(_materialRefs[n].rows[entry] == row) rowFound = true; } if(!rowFound) { ! _materialRefs[n].rows.push_back(row); XGBroadcast::SendBroadcast(kPaletteAddMsg, 0, mat); } --- 896,916 ---- for(n = 0, found = false; n < count; n++) { ! matReference_t *refPtr; ! ! refPtr = &_materialRefs[n]; ! numEntries = refPtr->rows.Length(); ! if(ref.name != NULL && refPtr->name != NULL) { ! if(refPtr->isCanonical == ref.isCanonical && String(refPtr->name) == str) { found = true; for(entry = 0, rowFound = false; entry < numEntries && !rowFound; entry++) { ! if(refPtr->rows[entry] == row) rowFound = true; } if(!rowFound) { ! refPtr->rows.push_back(row); XGBroadcast::SendBroadcast(kPaletteAddMsg, 0, mat); } *************** *** 916,930 **** else { ! if(_materialRefs[n].uid.species == ref.uid.species) { found = true; for(entry = 0, rowFound = false; entry < numEntries && !rowFound; entry++) { ! if(_materialRefs[n].rows[entry] == row) rowFound = true; } if(!rowFound) { ! _materialRefs[n].rows.push_back(row); XGBroadcast::SendBroadcast(kPaletteAddMsg, 0, mat); } --- 919,933 ---- else { ! if(refPtr->uid.species == ref.uid.species) { found = true; for(entry = 0, rowFound = false; entry < numEntries && !rowFound; entry++) { ! if(refPtr->rows[entry] == row) rowFound = true; } if(!rowFound) { ! refPtr->rows.push_back(row); XGBroadcast::SendBroadcast(kPaletteAddMsg, 0, mat); } |