set default profile ID when creating profiles

This commit is contained in:
Chris Danford
2006-05-16 05:28:26 +00:00
parent 6c5e043a32
commit 73d559156f
3 changed files with 33 additions and 3 deletions
+10
View File
@@ -486,6 +486,14 @@ bool ProfileManager::DeleteLocalProfile( RString sProfileID )
if( DeleteRecursive(sProfileDir) )
{
g_vLocalProfile.erase( i );
// Delete all references to this profileID
FOREACH_CONST( Preference<RString>*, PROFILEMAN->m_sDefaultLocalProfileID.m_v, i )
{
if( (*i)->Get() == sProfileID )
(*i)->Set( "" );
}
return true;
}
else
@@ -495,6 +503,8 @@ bool ProfileManager::DeleteLocalProfile( RString sProfileID )
}
}
LOG->Warn( "DeleteLocalProfile: ProfileID '%s' doesn't exist", sProfileID.c_str() );
return false;
}