aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/qtoolalign.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/qtoolalign.cpp')
-rw-r--r--linden/indra/newview/qtoolalign.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/linden/indra/newview/qtoolalign.cpp b/linden/indra/newview/qtoolalign.cpp
index 3fe31f7..b4944fe 100644
--- a/linden/indra/newview/qtoolalign.cpp
+++ b/linden/indra/newview/qtoolalign.cpp
@@ -36,7 +36,7 @@ const F32 MANIPULATOR_SELECT_SIZE = 20.0;
36 36
37 37
38QToolAlign::QToolAlign() 38QToolAlign::QToolAlign()
39: LLTool(std::string("Align")) 39: LLToolComposite(std::string("Align"))
40{ 40{
41} 41}
42 42
@@ -46,7 +46,6 @@ QToolAlign::~QToolAlign()
46} 46}
47 47
48 48
49
50BOOL QToolAlign::handleMouseDown(S32 x, S32 y, MASK mask) 49BOOL QToolAlign::handleMouseDown(S32 x, S32 y, MASK mask)
51{ 50{
52 if (mHighlightedAxis != -1) 51 if (mHighlightedAxis != -1)
@@ -62,6 +61,11 @@ BOOL QToolAlign::handleMouseDown(S32 x, S32 y, MASK mask)
62} 61}
63 62
64 63
64BOOL QToolAlign::handleDoubleClick(S32 x, S32 y, MASK mask)
65{
66 return TRUE;
67}
68
65 69
66void QToolAlign::pickCallback(const LLPickInfo& pick_info) 70void QToolAlign::pickCallback(const LLPickInfo& pick_info)
67{ 71{
@@ -95,7 +99,7 @@ void QToolAlign::pickCallback(const LLPickInfo& pick_info)
95 } 99 }
96 else 100 else
97 { 101 {
98 if (!(pick_info.mKeyMask == MASK_SHIFT)) 102 if (!(pick_info.mKeyMask & MASK_SHIFT))
99 { 103 {
100 LLSelectMgr::getInstance()->deselectAll(); 104 LLSelectMgr::getInstance()->deselectAll();
101 } 105 }
@@ -105,7 +109,6 @@ void QToolAlign::pickCallback(const LLPickInfo& pick_info)
105} 109}
106 110
107 111
108
109void QToolAlign::handleSelect() 112void QToolAlign::handleSelect()
110{ 113{
111 // no parts, please 114 // no parts, please
@@ -207,7 +210,6 @@ BOOL QToolAlign::handleHover(S32 x, S32 y, MASK mask)
207} 210}
208 211
209 212
210
211void setup_transforms_bbox(LLBBox bbox) 213void setup_transforms_bbox(LLBBox bbox)
212{ 214{
213 // translate to center 215 // translate to center
@@ -242,6 +244,7 @@ void render_bbox(LLBBox bbox)
242 gGL.popMatrix(); 244 gGL.popMatrix();
243} 245}
244 246
247
245void render_cone_bbox(LLBBox bbox) 248void render_cone_bbox(LLBBox bbox)
246{ 249{
247 glMatrixMode(GL_MODELVIEW); 250 glMatrixMode(GL_MODELVIEW);
@@ -256,7 +259,6 @@ void render_cone_bbox(LLBBox bbox)
256} 259}
257 260
258 261
259
260// the selection bbox isn't axis aligned, so we must construct one 262// the selection bbox isn't axis aligned, so we must construct one
261// should this be cached in the selection manager? yes. 263// should this be cached in the selection manager? yes.
262LLBBox get_selection_axis_aligned_bbox() 264LLBBox get_selection_axis_aligned_bbox()
@@ -288,7 +290,6 @@ LLBBox get_selection_axis_aligned_bbox()
288} 290}
289 291
290 292
291
292void QToolAlign::computeManipulatorSize() 293void QToolAlign::computeManipulatorSize()
293{ 294{
294 if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD) 295 if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD)
@@ -407,6 +408,7 @@ void QToolAlign::render()
407 } 408 }
408} 409}
409 410
411
410// only works for our specialized (AABB, position centered) bboxes 412// only works for our specialized (AABB, position centered) bboxes
411BOOL bbox_overlap(LLBBox bbox1, LLBBox bbox2) 413BOOL bbox_overlap(LLBBox bbox1, LLBBox bbox2)
412{ 414{
@@ -422,7 +424,6 @@ BOOL bbox_overlap(LLBBox bbox1, LLBBox bbox2)
422} 424}
423 425
424 426
425
426// used to sort bboxes before packing 427// used to sort bboxes before packing
427class BBoxCompare 428class BBoxCompare
428{ 429{
@@ -598,5 +599,3 @@ void QToolAlign::align()
598 599
599 LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); 600 LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);
600} 601}
601
602