viewer#2646 Fix viewer ignoring Physics Shape Type changes

asStringRef is only valid for strings
master
Andrey Kleshchev 2024-09-25 21:35:20 +03:00 committed by Andrey Kleshchev
parent 37f539bdbb
commit 49a2c136f9
2 changed files with 3 additions and 3 deletions

View File

@ -365,7 +365,7 @@ void LLComboBox::setValue(const LLSD& value)
if (LLScrollListItem* item = mList->getFirstSelected())
{
LLSD item_value = item->getValue();
if (item_value.asStringRef() == value.asStringRef())
if (item_value.asString() == value.asString())
return;
}

View File

@ -490,12 +490,12 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllData() const
// returns first matching item
LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const
{
const std::string& string_val = sd.asStringRef();
std::string string_val = sd.asString();
for (LLScrollListItem* item : mItemList)
{
// assumes string representation is good enough for comparison
if (item->getValue().asStringRef() == string_val)
if (item->getValue().asString() == string_val)
{
return item;
}