diff options
Diffstat (limited to 'linden/indra/newview/llglsandbox.cpp')
-rw-r--r-- | linden/indra/newview/llglsandbox.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index 81806dc..da3f7aa 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llglsandbox.cpp | 2 | * @file llglsandbox.cpp |
3 | * @brief GL functionality access | 3 | * @brief GL functionality access |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | 7 | * Copyright (c) 2003-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | /** | 32 | /** |
@@ -248,35 +251,35 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) | |||
248 | 251 | ||
249 | if (shrink_selection) | 252 | if (shrink_selection) |
250 | { | 253 | { |
251 | LLObjectSelectionHandle highlighted_objects = gSelectMgr->getHighlightedObjects(); | 254 | struct f : public LLSelectedObjectFunctor |
252 | 255 | { | |
253 | for (LLViewerObject* vobjp = highlighted_objects->getFirstObject(); | 256 | virtual bool apply(LLViewerObject* vobjp) |
254 | vobjp; | ||
255 | vobjp = highlighted_objects->getNextObject()) | ||
256 | { | 257 | { |
257 | LLDrawable* drawable = vobjp->mDrawable; | 258 | LLDrawable* drawable = vobjp->mDrawable; |
258 | if (!drawable || vobjp->getPCode() != LL_PCODE_VOLUME || vobjp->isAttachment()) | 259 | if (!drawable || vobjp->getPCode() != LL_PCODE_VOLUME || vobjp->isAttachment()) |
259 | { | 260 | { |
260 | continue; | 261 | return true; |
261 | } | 262 | } |
262 | |||
263 | S32 result = gCamera->sphereInFrustum(drawable->getPositionAgent(), drawable->getRadius()); | 263 | S32 result = gCamera->sphereInFrustum(drawable->getPositionAgent(), drawable->getRadius()); |
264 | switch (result) | 264 | switch (result) |
265 | { | 265 | { |
266 | case 0: | 266 | case 0: |
267 | gSelectMgr->unhighlightObjectOnly(vobjp); | 267 | gSelectMgr->unhighlightObjectOnly(vobjp); |
268 | break; | 268 | break; |
269 | case 1: | 269 | case 1: |
270 | // check vertices | 270 | // check vertices |
271 | if (!gCamera->areVertsVisible(vobjp, LLSelectMgr::sRectSelectInclusive)) | 271 | if (!gCamera->areVertsVisible(vobjp, LLSelectMgr::sRectSelectInclusive)) |
272 | { | 272 | { |
273 | gSelectMgr->unhighlightObjectOnly(vobjp); | 273 | gSelectMgr->unhighlightObjectOnly(vobjp); |
274 | } | 274 | } |
275 | break; | 275 | break; |
276 | default: | 276 | default: |
277 | break; | 277 | break; |
278 | } | 278 | } |
279 | return true; | ||
279 | } | 280 | } |
281 | } func; | ||
282 | gSelectMgr->getHighlightedObjects()->applyToObjects(&func); | ||
280 | } | 283 | } |
281 | 284 | ||
282 | if (grow_selection) | 285 | if (grow_selection) |