- copyIpcount = copyTree->tree[i].pcount;
- for (it = copyIpcount.begin(); it != copyIpcount.end();) {
- if (m->inUsersGroups(it->first, groups) != true) {
- copyIpcount.erase(it++);
- }else { it++; }
+ if (m->control_pressed) { return data; }
+
+ //pcountSize = 0, they are from a branch that is entirely from a group the user doesn't want
+ //pcountSize = 2, not unique to one group
+ //pcountSize = 1, unique to one group
+
+ int pcountSize = 0;
+ for (int j = 0; j < groups.size(); j++) {
+ map<string, int>::iterator itGroup = copyTree->tree[i].pcount.find(groups[j]);
+ if (itGroup != copyTree->tree[i].pcount.end()) { pcountSize++; if (pcountSize > 1) { break; } }