Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
fe9fc121
Commit
fe9fc121
authored
Jun 23, 2017
by
Cinder
Browse files
Fix ALCH-463
parent
c08a2e00
Changes
3
Hide whitespace changes
Inline
Side-by-side
indra/newview/llaoengine.cpp
View file @
fe9fc121
...
...
@@ -1524,16 +1524,11 @@ void LLAOEngine::tick()
{
if
(
!
isAgentAvatarValid
())
return
;
const
LLUUID
category
ID
=
gInventory
.
find
DescendentCategoryIDByName
(
gInventory
.
getRootFolderID
()
,
ROOT_AO_FOLDER
);
LLUUID
const
&
category
_id
=
gInventory
.
find
CategoryUUIDForNameInRoot
(
ROOT_AO_FOLDER
,
true
,
gInventory
.
getRootFolderID
());
if
(
category
ID
.
is
Null
())
if
(
category
_id
.
not
Null
())
{
LL_WARNS
(
"AOEngine"
)
<<
"no "
<<
ROOT_AO_FOLDER
<<
" folder yet. Creating ..."
<<
LL_ENDL
;
gInventory
.
createNewCategory
(
gInventory
.
getRootFolderID
(),
LLFolderType
::
FT_NONE
,
ROOT_AO_FOLDER
);
}
else
{
mAOFolder
=
categoryID
;
mAOFolder
=
category_id
;
LL_INFOS
(
"AOEngine"
)
<<
"AO basic folder structure intact."
<<
LL_ENDL
;
update
();
}
...
...
indra/newview/llinventorymodel.cpp
View file @
fe9fc121
...
...
@@ -467,6 +467,8 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E
}
}
const
LLUUID
LLInventoryModel
::
findCategoryUUIDForTypeInRoot
(
LLFolderType
::
EType
preferred_type
,
bool
create_folder
,
...
...
@@ -508,6 +510,39 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot(
return
rv
;
}
const
LLUUID
LLInventoryModel
::
findCategoryUUIDForNameInRoot
(
std
::
string
const
&
folder_name
,
bool
create_folder
,
LLUUID
const
&
root_id
)
{
LLUUID
rv
=
LLUUID
::
null
;
if
(
root_id
.
notNull
())
{
cat_array_t
*
cats
=
nullptr
;
cats
=
get_ptr_in_map
(
mParentChildCategoryTree
,
root_id
);
if
(
cats
)
{
U32
count
=
cats
->
size
();
for
(
U32
i
=
0
;
i
<
count
;
++
i
)
{
if
(
cats
->
at
(
i
)
->
getName
()
==
folder_name
)
{
LLUUID
const
&
folder_id
=
cats
->
at
(
i
)
->
getUUID
();
if
(
rv
.
isNull
()
||
folder_id
<
rv
)
{
rv
=
folder_id
;
}
}
}
}
}
if
(
rv
.
isNull
()
&&
isInventoryUsable
()
&&
create_folder
)
{
if
(
root_id
.
notNull
())
{
return
createNewCategory
(
root_id
,
LLFolderType
::
FT_NONE
,
folder_name
);
}
}
return
rv
;
}
// findCategoryUUIDForType() returns the uuid of the category that
// specifies 'type' as what it defaults to containing. The category is
// not necessarily only for that type. *NOTE: This will create a new
...
...
@@ -4270,4 +4305,3 @@ void LLInventoryModel::FetchItemHttpHandler::processFailure(const char * const r
<<
LLCoreHttpUtil
::
responseToString
(
response
)
<<
"]"
<<
LL_ENDL
;
gInventory
.
notifyObservers
();
}
indra/newview/llinventorymodel.h
View file @
fe9fc121
...
...
@@ -268,6 +268,10 @@ public:
bool
create_folder
,
const
LLUUID
&
root_id
);
const
LLUUID
findCategoryUUIDForNameInRoot
(
std
::
string
const
&
folder_name
,
bool
create_folder
,
LLUUID
const
&
root_id
);
// Returns the uuid of the category that specifies 'type' as what it
// defaults to containing. The category is not necessarily only for that type.
// NOTE: If create_folder is true, this will create a new inventory category
...
...
@@ -281,7 +285,7 @@ public:
// Returns user specified category for uploads, returns default id if there are no
// user specified one or it does not exist, creates default category if it is missing.
const
LLUUID
findUserDefinedCategoryUUIDForType
(
LLFolderType
::
EType
preferred_type
);
// Returns the uuid of the category if found, LLUUID::null is not
const
LLUUID
findDescendentCategoryIDByName
(
const
LLUUID
&
parent_id
,
const
std
::
string
&
name
)
const
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment