diff options
author | andreykproductengine <akleshchev@productengine.com> | 2016-07-14 19:31:35 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2016-07-14 19:31:35 +0300 |
commit | 9a262f345ebd777c21632fece812f6aa9bf8eff2 (patch) | |
tree | c338811e89b265e1e7e5060945404cb2c2a35975 /indra/llui | |
parent | efb49c8ccfe1ef997960bcc5dc991fa55b90b622 (diff) |
MAINT-6572 FIXED UI freezes when clicking on a specific folder in the inventory
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llui.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index aabc7ed2e4..f790d8e005 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -522,7 +522,7 @@ const LLView* LLUI::resolvePath(const LLView* context, const std::string& path) else { std::string part(ti->begin(), ti->end()); - context = context->findChildView(part, recurse); + context = context->findChildView(LLURI::unescape(part), recurse); recurse = false; } } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 62c3f401bf..e1d9b1a487 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -391,7 +391,27 @@ static void buildPathname(std::ostream& out, const LLView* view) buildPathname(out, view->getParent()); // Build pathname into ostream on the way back from recursion. - out << '/' << view->getName(); + out << '/'; + + // substitute all '/' in name with appropriate code + std::string name = view->getName(); + std::size_t found = name.find('/'); + std::size_t start = 0; + while (found != std::string::npos) + { + std::size_t sub_len = found - start; + if (sub_len > 0) + { + out << name.substr(start, sub_len); + } + out << "%2F"; + start = found + 1; + found = name.find('/', start); + } + if (start < name.size()) + { + out << name.substr(start, name.size() - start); + } } std::string LLView::getPathname() const |