summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-07-30 15:54:36 -0700
committerRider Linden <rider@lindenlab.com>2018-07-30 15:54:36 -0700
commitd6ede8e81cad497a6cd8482dfb48c99bdf5c258a (patch)
tree67ae8a9beb6d260e8e6401d2c8f6053b71285154 /indra/llinventory
parentbb836fcdec22c4dbdc40f768be491e0d5d897089 (diff)
MAINT-8904: Creating new setting in inventory now causes simulator to assign default asset ID to inventory item.
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llinventorysettings.cpp8
-rw-r--r--indra/llinventory/llinventorysettings.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/indra/llinventory/llinventorysettings.cpp b/indra/llinventory/llinventorysettings.cpp
index 8887c23a6c..fdad50e8d4 100644
--- a/indra/llinventory/llinventorysettings.cpp
+++ b/indra/llinventory/llinventorysettings.cpp
@@ -89,7 +89,6 @@ LLSettingsType::type_e LLSettingsType::fromInventoryFlags(U32 flags)
return (LLSettingsType::type_e)(flags & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK);
}
-
LLInventoryType::EIconName LLSettingsType::getIconName(LLSettingsType::type_e type)
{
const SettingsEntry *entry = LLSettingsDictionary::instance().lookup(type);
@@ -98,6 +97,13 @@ LLInventoryType::EIconName LLSettingsType::getIconName(LLSettingsType::type_e ty
return entry->mIconName;
}
+std::string LLSettingsType::getDefaultName(LLSettingsType::type_e type)
+{
+ const SettingsEntry *entry = LLSettingsDictionary::instance().lookup(type);
+ if (!entry)
+ return getDefaultName(ST_INVALID);
+ return entry->mDefaultNewName;
+}
void LLSettingsType::initClass(LLTranslationBridge::ptr_t &trans)
{
diff --git a/indra/llinventory/llinventorysettings.h b/indra/llinventory/llinventorysettings.h
index fb08190ea9..906540689c 100644
--- a/indra/llinventory/llinventorysettings.h
+++ b/indra/llinventory/llinventorysettings.h
@@ -46,6 +46,7 @@ public:
static type_e fromInventoryFlags(U32 flags);
static LLInventoryType::EIconName getIconName(type_e type);
+ static std::string getDefaultName(type_e type);
static void initClass(LLTranslationBridge::ptr_t &trans);
static void cleanupClass();