X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/1f2e83ab78a55bc0730bdd507c4fd64482fb0846..62a1e1a38321f11eeb36f8e2ade9bc0ee91084b4:/viewer/view_node.cpp?ds=sidebyside diff --git a/viewer/view_node.cpp b/viewer/view_node.cpp index 122ebc6..dbcc818 100644 --- a/viewer/view_node.cpp +++ b/viewer/view_node.cpp @@ -39,9 +39,11 @@ ViewNode::ViewNode (Canvas::Group *parent, uint num, uint padre, BTreeNodeHeader x += w; it++; + datas.push_back (v); + if (!dynamic_cast(data)) { /* Si no es un dato de una hoja, tiene hijos */ - hijos.push_back (data->getChild ()); + hijos.push_back (data->GetChild ()); } } } @@ -79,3 +81,19 @@ void ViewNode::SetSelected (bool b) } } +void ViewNode::HighliteKey (Clave &k) +{ + std::list::iterator it; + + it = datas.begin (); + while (it != datas.end ()) { + if ((*(*it)) == k) { + if (last_selected) + last_selected->SetSelected (false); + last_selected = *it; + last_selected->SetSelected (true); + } + it++; + } +} +