Fixed UserInterface selection of multiple sources. Cleared code for

Source searching by nodes pointers.
This commit is contained in:
brunoherbelin
2020-06-17 00:03:21 +02:00
parent 89fed033e9
commit da7ce52e2c
8 changed files with 54 additions and 38 deletions

View File

@@ -10,13 +10,16 @@ SearchVisitor::SearchVisitor(Node *node) : Visitor(), node_(node), found_(false)
void SearchVisitor::visit(Node &n)
{
if ( node_ == &n ){
if ( !found_ && node_ == &n ){
found_ = true;
}
}
void SearchVisitor::visit(Group &n)
{
if (found_)
return;
for (NodeSet::iterator node = n.begin(); node != n.end(); node++) {
(*node)->accept(*this);
if (found_)