]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blobdiff - viewer/view_btree.cpp
Bugfix del test.sh para que no 'oculte' errores por SIGSEGV.
[z.facultad/75.52/treemulator.git] / viewer / view_btree.cpp
index 3fba848252c01d506c56fcc8a30093cceb366847..43491870f07dea25e295773d1ef5b9f39ce2e814 100644 (file)
@@ -8,7 +8,7 @@ double ViewBTree::node_width = 0;
 double ViewBTree::node_height = 0;
 
 ViewBTree::ViewBTree (Canvas::Group *parent, std::string filename, uint block_size, int type):Canvas::Group (*parent, 0, 0),
-       BTree (filename, block_size, type)
+       BTree (filename, block_size, BTree::TYPE_UNIQUE, type)
 {
        /* Cada bytes lo hago de 5 units de ancho */
        node_width = 5 * block_size;
@@ -61,7 +61,6 @@ void ViewBTree::on_item_selected (BTreeData *data, uint num, ViewNode *vnode)
                if (vnode != last_selected)
                        last_selected->SetSelected (false);
        last_selected = vnode;
-       vnode->SetSelected (true);
 
        m_signal_selected (data, node_h);
 }
@@ -71,3 +70,14 @@ ViewBTree::type_signal_selected ViewBTree::signal_selected ()
        return m_signal_selected;
 }
 
+void ViewBTree::Clear ()
+{
+       if (last_selected)
+               delete last_selected;
+}
+
+void ViewBTree::HighliteKey (Clave &k)
+{
+       last_selected->HighliteKey (k);
+}
+