Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv17647/src/classes
Modified Files:
MFolder.cpp
Log Message:
fixed bug with renaming the folder twice or more during the same session
Index: MFolder.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MFolder.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -b -u -2 -r1.78 -r1.79
--- MFolder.cpp 27 Mar 2002 19:37:17 -0000 1.78
+++ MFolder.cpp 1 May 2002 22:10:50 -0000 1.79
@@ -1000,4 +1000,5 @@
{
Check();
+
int index = ms_aFolderNames.Index(name);
return index == wxNOT_FOUND ? NULL : ms_aFolders[(size_t)index];
@@ -1037,7 +1038,12 @@
void MFolderCache::RenameAll(const String& oldName, const String& newName)
{
- MFolderFromProfile *folder = (MFolderFromProfile *)Get(oldName);
- if ( folder )
+ int index = ms_aFolderNames.Index(oldName);
+ if ( index != wxNOT_FOUND )
{
+ size_t n = (size_t)index;
+
+ ms_aFolderNames[n] = newName;
+ MFolderFromProfile *folder = (MFolderFromProfile *)ms_aFolders[n];
+
folder->m_folderName = newName;
SafeDecRef(folder->m_profile);
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates