X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/8d91dae9933285ea0ba05eb19ac6263129b39599..ea5776d090486ba7895940545e8dff58d558a7d3:/viewer/view_properties.cpp?ds=sidebyside diff --git a/viewer/view_properties.cpp b/viewer/view_properties.cpp index 8f92d5f..11498ba 100644 --- a/viewer/view_properties.cpp +++ b/viewer/view_properties.cpp @@ -113,8 +113,11 @@ void ViewProperties::ShowItem (BTreeData *data, BTreeNodeHeader &header) std::string ViewProperties::ToRaw (BTreeData *p) { std::stringstream ss; - uint size = p->Size (), i; - uchar *arr = p->ToArray (); + uint size = 0, i; + uchar *arr = NULL; + if (p->GetKey ()) { + arr = p->GetKey ()->ToRaw (size); + } for (i=0; i < size; i++) { if (isalnum (arr[i])) @@ -123,7 +126,14 @@ std::string ViewProperties::ToRaw (BTreeData *p) ss << "."; } - delete [] arr; + if (p->GetChild () != 0) { + ss << "("; + ss << p->GetChild (); + ss << ")"; + } + + if (arr) + delete [] arr; return ss.str (); }