aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2009-01-15 15:10:30 -0600
committerJacek Antonelli2009-01-15 15:10:30 -0600
commit3e7f79f569e17c845152a7039d084a7877517f11 (patch)
tree99bb81eb1187c77cee85218c86cc7b15c6a9aa07
parentLLInventoryViewFinder::rebuildFilter(). (diff)
downloadmeta-impy-3e7f79f569e17c845152a7039d084a7877517f11.zip
meta-impy-3e7f79f569e17c845152a7039d084a7877517f11.tar.gz
meta-impy-3e7f79f569e17c845152a7039d084a7877517f11.tar.bz2
meta-impy-3e7f79f569e17c845152a7039d084a7877517f11.tar.xz
Simplified rebuildFilter() a bit.
-rw-r--r--ChangeLog.txt5
-rw-r--r--linden/indra/newview/llinventoryview.cpp17
2 files changed, 7 insertions, 15 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 8498188..a34e2da 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,8 +1,13 @@
12009-01-15 Jacek Antonelli <jacek.antonelli@gmail.com> 12009-01-15 Jacek Antonelli <jacek.antonelli@gmail.com>
2 2
3 * linden/indra/newview/llinventoryview.cpp: 3 * linden/indra/newview/llinventoryview.cpp:
4 Simplified rebuildFilter() a bit.
5
6
7 * linden/indra/newview/llinventoryview.cpp:
4 LLInventoryViewFinder::rebuildFilter(). 8 LLInventoryViewFinder::rebuildFilter().
5 Refactored from draw(). 9 Refactored from draw().
10
6 * linden/indra/newview/llinventoryview.h: 11 * linden/indra/newview/llinventoryview.h:
7 Ditto. 12 Ditto.
8 13
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index 4beb370..4576ff9 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -209,82 +209,69 @@ void LLInventoryViewFinder::draw()
209 209
210void LLInventoryViewFinder::rebuildFilter() 210void LLInventoryViewFinder::rebuildFilter()
211{ 211{
212 U32 filter = 0xffffffff; 212 U32 filter = LLInventoryType::NIT_ALL;
213 BOOL filtered_by_all_types = TRUE;
214 213
215 if (!childGetValue("check_animation")) 214 if (!childGetValue("check_animation"))
216 { 215 {
217 filter &= ~(LLInventoryType::NIT_ANIMATION); 216 filter &= ~(LLInventoryType::NIT_ANIMATION);
218 filtered_by_all_types = FALSE;
219 } 217 }
220 218
221 if (!childGetValue("check_bodypart")) 219 if (!childGetValue("check_bodypart"))
222 { 220 {
223 filter &= ~(LLInventoryType::NIT_BODYPART); 221 filter &= ~(LLInventoryType::NIT_BODYPART);
224 filtered_by_all_types = FALSE;
225 } 222 }
226 223
227 if (!childGetValue("check_calling_card")) 224 if (!childGetValue("check_calling_card"))
228 { 225 {
229 filter &= ~(LLInventoryType::NIT_CALLCARD); 226 filter &= ~(LLInventoryType::NIT_CALLCARD);
230 filtered_by_all_types = FALSE;
231 } 227 }
232 228
233 if (!childGetValue("check_clothing")) 229 if (!childGetValue("check_clothing"))
234 { 230 {
235 filter &= ~(LLInventoryType::NIT_CLOTHING); 231 filter &= ~(LLInventoryType::NIT_CLOTHING);
236 filtered_by_all_types = FALSE;
237 } 232 }
238 233
239 if (!childGetValue("check_gesture")) 234 if (!childGetValue("check_gesture"))
240 { 235 {
241 filter &= ~(LLInventoryType::NIT_GESTURE); 236 filter &= ~(LLInventoryType::NIT_GESTURE);
242 filtered_by_all_types = FALSE;
243 } 237 }
244 238
245 if (!childGetValue("check_landmark")) 239 if (!childGetValue("check_landmark"))
246 { 240 {
247 filter &= ~(LLInventoryType::NIT_LANDMARK); 241 filter &= ~(LLInventoryType::NIT_LANDMARK);
248 filtered_by_all_types = FALSE;
249 } 242 }
250 243
251 if (!childGetValue("check_notecard")) 244 if (!childGetValue("check_notecard"))
252 { 245 {
253 filter &= ~(LLInventoryType::NIT_NOTECARD); 246 filter &= ~(LLInventoryType::NIT_NOTECARD);
254 filtered_by_all_types = FALSE;
255 } 247 }
256 248
257 if (!childGetValue("check_object")) 249 if (!childGetValue("check_object"))
258 { 250 {
259 filter &= ~(LLInventoryType::NIT_OBJECT); 251 filter &= ~(LLInventoryType::NIT_OBJECT);
260 filtered_by_all_types = FALSE;
261 } 252 }
262 253
263 if (!childGetValue("check_script")) 254 if (!childGetValue("check_script"))
264 { 255 {
265 filter &= ~(LLInventoryType::NIT_SCRIPT_LSL2); 256 filter &= ~(LLInventoryType::NIT_SCRIPT_LSL2);
266 filtered_by_all_types = FALSE;
267 } 257 }
268 258
269 if (!childGetValue("check_sound")) 259 if (!childGetValue("check_sound"))
270 { 260 {
271 filter &= ~(LLInventoryType::NIT_SOUND); 261 filter &= ~(LLInventoryType::NIT_SOUND);
272 filtered_by_all_types = FALSE;
273 } 262 }
274 263
275 if (!childGetValue("check_texture")) 264 if (!childGetValue("check_texture"))
276 { 265 {
277 filter &= ~(LLInventoryType::NIT_TEXTURE); 266 filter &= ~(LLInventoryType::NIT_TEXTURE);
278 filtered_by_all_types = FALSE;
279 } 267 }
280 268
281 if (!childGetValue("check_snapshot")) 269 if (!childGetValue("check_snapshot"))
282 { 270 {
283 filter &= ~(LLInventoryType::NIT_SNAPSHOT); 271 filter &= ~(LLInventoryType::NIT_SNAPSHOT);
284 filtered_by_all_types = FALSE;
285 } 272 }
286 273
287 if (!filtered_by_all_types) 274 if (filter != LLInventoryType::NIT_ALL)
288 { 275 {
289 // don't include folders in filter, unless I've selected everything 276 // don't include folders in filter, unless I've selected everything
290 filter &= ~(LLInventoryType::NIT_FOLDER); 277 filter &= ~(LLInventoryType::NIT_FOLDER);