diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterinspect.cpp | 80 |
1 files changed, 54 insertions, 26 deletions
diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp index 1548c0e..80da7b6 100644 --- a/linden/indra/newview/llfloaterinspect.cpp +++ b/linden/indra/newview/llfloaterinspect.cpp | |||
@@ -64,42 +64,54 @@ void LLFloaterInspect::show(void* ignored) | |||
64 | void LLFloaterInspect::onClickCreatorProfile(void* ctrl) | 64 | void LLFloaterInspect::onClickCreatorProfile(void* ctrl) |
65 | { | 65 | { |
66 | if(sInstance->mObjectList->getAllSelected().size() == 0) return; | 66 | if(sInstance->mObjectList->getAllSelected().size() == 0) return; |
67 | LLSelectNode* obj = sInstance->mObjectSelection->getFirstNode(); | 67 | LLScrollListItem* first_selected = |
68 | LLUUID obj_id, creator_id; | 68 | sInstance->mObjectList->getFirstSelected(); |
69 | obj_id = sInstance->mObjectList->getFirstSelected()->getUUID(); | 69 | |
70 | while(obj) | 70 | if (first_selected) |
71 | { | 71 | { |
72 | if(obj_id == obj->getObject()->getID()) | 72 | LLSelectNode* obj= sInstance->mObjectSelection->getFirstNode(); |
73 | LLUUID obj_id, creator_id; | ||
74 | obj_id = first_selected->getUUID(); | ||
75 | while(obj) | ||
73 | { | 76 | { |
74 | creator_id = obj->mPermissions->getCreator(); | 77 | if(obj_id == obj->getObject()->getID()) |
75 | break; | 78 | { |
79 | creator_id = obj->mPermissions->getCreator(); | ||
80 | break; | ||
81 | } | ||
82 | obj = sInstance->mObjectSelection->getNextNode(); | ||
83 | } | ||
84 | if(obj) | ||
85 | { | ||
86 | LLFloaterAvatarInfo::showFromDirectory(creator_id); | ||
76 | } | 87 | } |
77 | obj = sInstance->mObjectSelection->getNextNode(); | ||
78 | } | ||
79 | if(obj) | ||
80 | { | ||
81 | LLFloaterAvatarInfo::showFromDirectory(creator_id); | ||
82 | } | 88 | } |
83 | } | 89 | } |
84 | 90 | ||
85 | void LLFloaterInspect::onClickOwnerProfile(void* ctrl) | 91 | void LLFloaterInspect::onClickOwnerProfile(void* ctrl) |
86 | { | 92 | { |
87 | if(sInstance->mObjectList->getAllSelected().size() == 0) return; | 93 | if(sInstance->mObjectList->getAllSelected().size() == 0) return; |
88 | LLSelectNode* obj = sInstance->mObjectSelection->getFirstNode(); | 94 | LLScrollListItem* first_selected = |
89 | LLUUID obj_id, owner_id; | 95 | sInstance->mObjectList->getFirstSelected(); |
90 | obj_id = sInstance->mObjectList->getFirstSelected()->getUUID(); | 96 | |
91 | while(obj) | 97 | if (first_selected) |
92 | { | 98 | { |
93 | if(obj_id == obj->getObject()->getID()) | 99 | LLSelectNode* obj= sInstance->mObjectSelection->getFirstNode(); |
100 | LLUUID obj_id, owner_id; | ||
101 | obj_id = first_selected->getUUID(); | ||
102 | while(obj) | ||
94 | { | 103 | { |
95 | owner_id = obj->mPermissions->getOwner(); | 104 | if(obj_id == obj->getObject()->getID()) |
96 | break; | 105 | { |
106 | owner_id = obj->mPermissions->getOwner(); | ||
107 | break; | ||
108 | } | ||
109 | obj = sInstance->mObjectSelection->getNextNode(); | ||
110 | } | ||
111 | if(obj) | ||
112 | { | ||
113 | LLFloaterAvatarInfo::showFromDirectory(owner_id); | ||
97 | } | 114 | } |
98 | obj = sInstance->mObjectSelection->getNextNode(); | ||
99 | } | ||
100 | if(obj) | ||
101 | { | ||
102 | LLFloaterAvatarInfo::showFromDirectory(owner_id); | ||
103 | } | 115 | } |
104 | } | 116 | } |
105 | 117 | ||
@@ -125,7 +137,15 @@ LLUUID LLFloaterInspect::getSelectedUUID() | |||
125 | { | 137 | { |
126 | if(sInstance) | 138 | if(sInstance) |
127 | { | 139 | { |
128 | if(sInstance->mObjectList->getAllSelected().size() > 0) return sInstance->mObjectList->getFirstSelected()->getUUID(); | 140 | if(sInstance->mObjectList->getAllSelected().size() > 0) |
141 | { | ||
142 | LLScrollListItem* first_selected = | ||
143 | sInstance->mObjectList->getFirstSelected(); | ||
144 | if (first_selected) | ||
145 | { | ||
146 | return first_selected->getUUID(); | ||
147 | } | ||
148 | } | ||
129 | } | 149 | } |
130 | return LLUUID::null; | 150 | return LLUUID::null; |
131 | } | 151 | } |
@@ -139,7 +159,15 @@ void LLFloaterInspect::refresh() | |||
139 | childSetEnabled("button creator", false); | 159 | childSetEnabled("button creator", false); |
140 | LLUUID selected_uuid; | 160 | LLUUID selected_uuid; |
141 | S32 selected_index = mObjectList->getFirstSelectedIndex(); | 161 | S32 selected_index = mObjectList->getFirstSelectedIndex(); |
142 | if(selected_index > -1) selected_uuid = mObjectList->getFirstSelected()->getUUID(); | 162 | if(selected_index > -1) |
163 | { | ||
164 | LLScrollListItem* first_selected = | ||
165 | mObjectList->getFirstSelected(); | ||
166 | if (first_selected) | ||
167 | { | ||
168 | selected_uuid = first_selected->getUUID(); | ||
169 | } | ||
170 | } | ||
143 | mObjectList->operateOnAll(LLScrollListCtrl::OP_DELETE); | 171 | mObjectList->operateOnAll(LLScrollListCtrl::OP_DELETE); |
144 | //List all transient objects, then all linked objects | 172 | //List all transient objects, then all linked objects |
145 | LLSelectNode* obj = mObjectSelection->getFirstNode(); | 173 | LLSelectNode* obj = mObjectSelection->getFirstNode(); |