Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
a9e409c7
Commit
a9e409c7
authored
15 years ago
by
Eric M. Tulla (BigPapi)
Browse files
Options
Downloads
Plain Diff
Automated merge with
ssh://hg.lindenlab.com/viewer/viewer-2-0/
parents
0300b814
41708306
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llfloateropenobject.cpp
+42
-11
42 additions, 11 deletions
indra/newview/llfloateropenobject.cpp
with
42 additions
and
11 deletions
indra/newview/llfloateropenobject.cpp
+
42
−
11
View file @
a9e409c7
...
@@ -72,11 +72,14 @@ LLFloaterOpenObject::~LLFloaterOpenObject()
...
@@ -72,11 +72,14 @@ LLFloaterOpenObject::~LLFloaterOpenObject()
{
{
// sInstance = NULL;
// sInstance = NULL;
}
}
// virtual
// virtual
BOOL
LLFloaterOpenObject
::
postBuild
()
BOOL
LLFloaterOpenObject
::
postBuild
()
{
{
childSetTextArg
(
"object_name"
,
"[DESC]"
,
std
::
string
(
"Object"
)
);
// *Note: probably do not want to translate this
childSetTextArg
(
"object_name"
,
"[DESC]"
,
std
::
string
(
"Object"
)
);
// *Note: probably do not want to translate this
mPanelInventoryObject
=
getChild
<
LLPanelObjectInventory
>
(
"object_contents"
);
mPanelInventoryObject
=
getChild
<
LLPanelObjectInventory
>
(
"object_contents"
);
refresh
();
return
TRUE
;
return
TRUE
;
}
}
...
@@ -95,29 +98,57 @@ void LLFloaterOpenObject::onOpen(const LLSD& key)
...
@@ -95,29 +98,57 @@ void LLFloaterOpenObject::onOpen(const LLSD& key)
return
;
return
;
}
}
mObjectSelection
=
LLSelectMgr
::
getInstance
()
->
getEditSelection
();
mObjectSelection
=
LLSelectMgr
::
getInstance
()
->
getEditSelection
();
refresh
();
}
}
void
LLFloaterOpenObject
::
refresh
()
void
LLFloaterOpenObject
::
refresh
()
{
{
mPanelInventoryObject
->
refresh
();
mPanelInventoryObject
->
refresh
();
std
::
string
name
;
std
::
string
name
=
""
;
BOOL
enabled
;
// Enable the copy || copy & wear buttons only if we have something we can copy or copy & wear (respectively).
bool
copy_enabled
=
false
;
bool
wear_enabled
=
false
;
LLSelectNode
*
node
=
mObjectSelection
->
getFirstRootNode
();
LLSelectNode
*
node
=
mObjectSelection
->
getFirstRootNode
();
if
(
node
)
if
(
node
)
{
{
name
=
node
->
mName
;
name
=
node
->
mName
;
enabled
=
TRUE
;
copy_enabled
=
true
;
}
else
LLViewerObject
*
object
=
node
->
getObject
();
{
if
(
object
)
name
=
""
;
{
enabled
=
FALSE
;
// this folder is coming from an object, as there is only one folder in an object, the root,
// we need to collect the entire contents and handle them as a group
InventoryObjectList
inventory_objects
;
object
->
getInventoryContents
(
inventory_objects
);
if
(
!
inventory_objects
.
empty
())
{
for
(
InventoryObjectList
::
iterator
it
=
inventory_objects
.
begin
();
it
!=
inventory_objects
.
end
();
++
it
)
{
LLInventoryItem
*
item
=
static_cast
<
LLInventoryItem
*>
((
LLInventoryObject
*
)(
*
it
));
LLInventoryType
::
EType
type
=
item
->
getInventoryType
();
if
(
type
==
LLInventoryType
::
IT_OBJECT
||
type
==
LLInventoryType
::
IT_ATTACHMENT
||
type
==
LLInventoryType
::
IT_WEARABLE
||
type
==
LLInventoryType
::
IT_GESTURE
)
{
wear_enabled
=
true
;
break
;
}
}
}
}
}
}
childSetTextArg
(
"object_name"
,
"[DESC]"
,
name
);
childSetTextArg
(
"object_name"
,
"[DESC]"
,
name
);
childSetEnabled
(
"copy_to_inventory_button"
,
enabled
);
childSetEnabled
(
"copy_to_inventory_button"
,
copy_
enabled
);
childSetEnabled
(
"copy_and_wear_button"
,
enabled
);
childSetEnabled
(
"copy_and_wear_button"
,
wear_
enabled
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment