diff options
author | Rider Linden <rider@lindenlab.com> | 2018-07-30 15:54:36 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-07-30 15:54:36 -0700 |
commit | d6ede8e81cad497a6cd8482dfb48c99bdf5c258a (patch) | |
tree | 67ae8a9beb6d260e8e6401d2c8f6053b71285154 /indra/newview/llviewerinventory.cpp | |
parent | bb836fcdec22c4dbdc40f768be491e0d5d897089 (diff) |
MAINT-8904: Creating new setting in inventory now causes simulator to assign default asset ID to inventory item.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 09b07b83b8..e4d3d73a3e 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1823,37 +1823,29 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, } else if (("sky" == type_name) || ("water" == type_name) || ("daycycle" == type_name)) { - LLSettingsBase::ptr_t settings; - std::string name; + LLSettingsType::type_e stype(LLSettingsType::ST_NONE); if ("sky" == type_name) { - settings = LLSettingsVOSky::buildDefaultSky(); - name = LLTrans::getString("New Sky"); + stype = LLSettingsType::ST_SKY; } else if ("water" == type_name) { - settings = LLSettingsVOWater::buildDefaultWater(); - name = LLTrans::getString("New Water"); + stype = LLSettingsType::ST_WATER; } else if ("daycycle" == type_name) { - settings = LLSettingsVODay::buildDefaultDayCycle(); - name = LLTrans::getString("New Daycycle"); + stype = LLSettingsType::ST_DAYCYCLE; } else - LL_ERRS(LOG_INV) << "Unknown settings type: '" << type_name << "'" << LL_ENDL; - - if (!settings) { - LL_WARNS(LOG_INV) << "Unable to create a default setting object of type '" << type_name << "'" << LL_ENDL; + LL_ERRS(LOG_INV) << "Unknown settings type: '" << type_name << "'" << LL_ENDL; return; } LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS); - settings->setName(name); - LLSettingsVOBase::createInventoryItem(settings, parent_id); + LLSettingsVOBase::createNewInventoryItem(stype, parent_id); } else { |