X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/8d91dae9933285ea0ba05eb19ac6263129b39599..aa158a0284c1bc32a979d50275aa1b24438d46ef:/viewer/view_properties.cpp?ds=sidebyside diff --git a/viewer/view_properties.cpp b/viewer/view_properties.cpp index 8f92d5f..0e789df 100644 --- a/viewer/view_properties.cpp +++ b/viewer/view_properties.cpp @@ -113,17 +113,28 @@ 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])) + if (isalnum (arr[i]) || (arr[i] == ']') || (arr[i] == '|') || + (arr[i] == '[') || (arr[i] == '-')) ss << arr[i]; else ss << "."; } - delete [] arr; + if (p->GetChild () != 0) { + ss << "("; + ss << p->GetChild (); + ss << ")"; + } + + if (arr) + delete [] arr; return ss.str (); }