From f96f0b41b9de2afcc335478d04463a51e23d4190 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Tue, 1 Sep 2020 18:41:45 +0200 Subject: [PATCH] Removed an unused variable and don't show groups anymore when there is only one --- code/ryzom/client/src/interface_v3/people_list.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index ece5b5cc8..33d1c900e 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -281,9 +281,8 @@ void CPeopleList::sortEx(TSortOrder order) } CGroupContainer *group = _BaseContainer; - ucstring groupName = ""; uint groupIndex = 0; - + for(k = 0; k < _Peoples.size(); ++k) { bool newGroup = false; @@ -296,10 +295,9 @@ void CPeopleList::sortEx(TSortOrder order) newGroup = true; ++groupIndex; } - if (newGroup && groupIndex < _GroupContainers.size()) + if (newGroup && groupIndex < _GroupContainers.size() && _GroupContainers.size() > 1) { group = _GroupContainers[groupIndex].second; - groupName = _GroupContainers[groupIndex].first; _BaseContainer->attachContainer(group); } group->attachContainer(_Peoples[k].Container); @@ -556,7 +554,7 @@ void CPeopleList::readContactGroups() if (index < _Peoples.size()) { _Peoples[index].Group = propGroup.str(); - if (_GroupContainers.empty() || _GroupContainers.back().first != propName.str()) { + if (_GroupContainers.empty() || _GroupContainers.back().first != propGroup.str()) { vector > properties; properties.push_back(make_pair(string("posparent"), string("parent"))); properties.push_back(make_pair(string("id"), _ContainerID + "_group_" + toString(_GroupContainers.size())));