diff options
author | McCabe Maxsted | 2010-11-13 01:01:08 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-11-13 01:01:31 -0700 |
commit | 3c51d5f2171fba704eea9c36bf9a476f5f7a59ae (patch) | |
tree | e64b5f18ca7ad235aff1c3b42a17d21b0ad696bc /linden/indra/newview | |
parent | Added some status text for the new align tool (diff) | |
download | meta-impy-3c51d5f2171fba704eea9c36bf9a476f5f7a59ae.zip meta-impy-3c51d5f2171fba704eea9c36bf9a476f5f7a59ae.tar.gz meta-impy-3c51d5f2171fba704eea9c36bf9a476f5f7a59ae.tar.bz2 meta-impy-3c51d5f2171fba704eea9c36bf9a476f5f7a59ae.tar.xz |
Ported fix from Ascent: disable align tool controls if you can't move the object, by Beeks
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/qtoolalign.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/linden/indra/newview/qtoolalign.cpp b/linden/indra/newview/qtoolalign.cpp index ac6a0bb..3fe31f7 100644 --- a/linden/indra/newview/qtoolalign.cpp +++ b/linden/indra/newview/qtoolalign.cpp | |||
@@ -387,8 +387,24 @@ void QToolAlign::render() | |||
387 | LLColor4 default_normal_color( 0.7f, 0.7f, 0.7f, 0.1f ); | 387 | LLColor4 default_normal_color( 0.7f, 0.7f, 0.7f, 0.1f ); |
388 | gGL.color4fv( default_normal_color.mV ); | 388 | gGL.color4fv( default_normal_color.mV ); |
389 | 389 | ||
390 | render_bbox(mBBox); | 390 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getEditSelection(); |
391 | renderManipulators(); | 391 | BOOL can_move = selection->getObjectCount() != 0; |
392 | if (can_move) | ||
393 | { | ||
394 | struct f : public LLSelectedObjectFunctor | ||
395 | { | ||
396 | virtual bool apply(LLViewerObject* objectp) | ||
397 | { | ||
398 | return objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); | ||
399 | } | ||
400 | } func; | ||
401 | can_move = selection->applyToObjects(&func); | ||
402 | } | ||
403 | if (can_move) | ||
404 | { | ||
405 | render_bbox(mBBox); | ||
406 | renderManipulators(); | ||
407 | } | ||
392 | } | 408 | } |
393 | 409 | ||
394 | // only works for our specialized (AABB, position centered) bboxes | 410 | // only works for our specialized (AABB, position centered) bboxes |