Meta specifications where not reported into search
This commit is contained in:
@@ -181,12 +181,12 @@ void User::LinkOrUnlinkOperation(Operation& op)
|
||||
}
|
||||
}
|
||||
|
||||
void User::Group(const Operation& op)
|
||||
bool User::Group(std::vector<Operation>* ops, const Operation& op)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
std::vector<wxString>::iterator it2;
|
||||
|
||||
for (it = (*_operations[op.year])[op.month].begin(); it != (*_operations[op.year])[op.month].end(); it++)
|
||||
for (it = ops->begin(); it != ops->end(); it++)
|
||||
{
|
||||
if (it->id == op.parent)
|
||||
{
|
||||
@@ -194,13 +194,22 @@ void User::Group(const Operation& op)
|
||||
if (*it2 == op.id)
|
||||
break;
|
||||
// Already into childs
|
||||
if (it2 != it->childs.end()) return;
|
||||
if (it2 != it->childs.end()) return true;
|
||||
it->childs.push_back(op.id);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_db->LoadOperation(this, op.parent))
|
||||
return false ;
|
||||
}
|
||||
|
||||
void User::Group(const Operation& op)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
std::vector<wxString>::iterator it2;
|
||||
|
||||
if (!Group(&(*_operations[op.year])[op.month], op)
|
||||
&& _db->LoadOperation(this, op.parent))
|
||||
{
|
||||
(*_operations[op.year])[op.month][(*_operations[op.year])[op.month].size()-1].childs.push_back(op.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user