mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed some escaping of slash characters in TreeViewItem identifier strings.
This commit is contained in:
parent
77afce6297
commit
40ba90b19f
1 changed files with 7 additions and 2 deletions
|
|
@ -1773,6 +1773,11 @@ TreeViewItem* TreeViewItem::getNextVisibleItem (const bool recurse) const noexce
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static String escapeSlashesInTreeViewItemName (const String& s)
|
||||
{
|
||||
return s.replaceCharacter ('/', '\\');
|
||||
}
|
||||
|
||||
String TreeViewItem::getItemIdentifierString() const
|
||||
{
|
||||
String s;
|
||||
|
|
@ -1780,12 +1785,12 @@ String TreeViewItem::getItemIdentifierString() const
|
|||
if (parentItem != nullptr)
|
||||
s = parentItem->getItemIdentifierString();
|
||||
|
||||
return s + "/" + getUniqueName().replaceCharacter ('/', '\\');
|
||||
return s + "/" + escapeSlashesInTreeViewItemName (getUniqueName());
|
||||
}
|
||||
|
||||
TreeViewItem* TreeViewItem::findItemFromIdentifierString (const String& identifierString)
|
||||
{
|
||||
const String thisId ("/" + getUniqueName());
|
||||
const String thisId ("/" + escapeSlashesInTreeViewItemName (getUniqueName()));
|
||||
|
||||
if (thisId == identifierString)
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue