diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-21 10:06:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-21 10:06:08 +0000 |
commit | 2b15611f3f55ac8632198ffc380e3d79640d252a (patch) | |
tree | a66f84bbf488fe34092f13d9186d33f3b368f5b1 /src | |
parent | 8c3cbcda74c623659460414591e14430155e2dcd (diff) |
fixed nasty bug in groups' cache coherence
git-svn-id: http://svn.miranda-ng.org/main/trunk@17329 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clistgroups.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp index 524f91b9f0..dc5ed18927 100644 --- a/src/mir_app/src/clistgroups.cpp +++ b/src/mir_app/src/clistgroups.cpp @@ -309,11 +309,11 @@ MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefore) pGroup->groupId = hGroupBefore; // reinsert group back
pGroup->save();
-
arByIds.insert(pGroup);
+
g_bGroupsLocked = false;
Clist_BroadcastAsync(CLM_AUTOREBUILD, 0, 0);
- return shuffleTo + 1;
+ return hGroupBefore + 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -331,13 +331,15 @@ static int RenameGroupWithMove(int groupId, const wchar_t *szName, int move) // do the change
wchar_t *oldName = NEWWSTR_ALLOCA(pGroup->groupName+1);
+ arByName.remove(pGroup);
wchar_t str[256];
str[0] = pGroup->groupName[0];
mir_wstrncpy(str + 1, szName, _countof(str) - 1);
- pGroup->groupName = mir_wstrdup(str);
+ replaceStrW(pGroup->groupName, str);
pGroup->save();
+ arByName.insert(pGroup);
// must rename setting in all child contacts too
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
|