Menu

#9 Files are lost or put in wrong group

open
nobody
None
5
2013-01-14
2004-02-19
Hugh Gibson
No

If you don't have groups in the project, then some files
may be lost when you close the project and re-open it.

The is because SFile::nGroupInx is initialised to -1 for
files which aren't in a group, but
CPdpManager::SortGroups uses negative values for this
member as part of the re-organisation of files. There is a
loop at the end of this function which changes -ve
values to +ve values, so if you don't have a group
defined, you will lose all old files when you save the
project.

The fix is a similar hack - instead of setting all files that
have been re-mapped to have a -ve nGroupInx, add on
a big constant (I used 10000). Then in the loop at the
end of CPdpManager::SortGroups check for nGroupInx
values >= this constant, and subtract nGroupInx.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.