ClaveVariable c(str_key, atoi(str_val.c_str()));
tree->AddKey(c);
}
- delete tree->last_selected;
- tree->AddNode (0);
+
+ /* Muestro la clave agregada */
+ BTreeFindResult* result = 0;
+ Clave *c = NULL;
+ if (tree->type() == BTree::KEY_FIXED) {
+ c = new ClaveFija (atoi(str_key.c_str()), 0);
+ result = tree->FindKey(*c);
+ } else {
+ c = new ClaveVariable (str_key, 0);
+ result = tree->FindKey(*c);
+ }
+ if (result) {
+ tree->Clear ();
+ tree->AddNode(result->node);
+ tree->HighliteKey (*c);
+ delete result;
+ } else {
+ delete tree->last_selected;
+ tree->last_selected = NULL;
+ tree->AddNode (0);
+ }
+ if (c) delete c;
real_canvas->scroll_to (0, 0);
}
}
}
delete tree->last_selected;
tree->AddNode (0);
- real_canvas->scroll_to (0, 0);
}
}