diff options
Diffstat (limited to 'linden/indra/newview/lltoolface.cpp')
-rw-r--r-- | linden/indra/newview/lltoolface.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/linden/indra/newview/lltoolface.cpp b/linden/indra/newview/lltoolface.cpp index bb2fc04..071d5d2 100644 --- a/linden/indra/newview/lltoolface.cpp +++ b/linden/indra/newview/lltoolface.cpp | |||
@@ -47,9 +47,6 @@ | |||
47 | #include "llviewerwindow.h" | 47 | #include "llviewerwindow.h" |
48 | #include "llfloatertools.h" | 48 | #include "llfloatertools.h" |
49 | 49 | ||
50 | // Globals | ||
51 | LLToolFace *gToolFace = NULL; | ||
52 | |||
53 | // | 50 | // |
54 | // Member functions | 51 | // Member functions |
55 | // | 52 | // |
@@ -65,7 +62,7 @@ LLToolFace::~LLToolFace() | |||
65 | 62 | ||
66 | BOOL LLToolFace::handleDoubleClick(S32 x, S32 y, MASK mask) | 63 | BOOL LLToolFace::handleDoubleClick(S32 x, S32 y, MASK mask) |
67 | { | 64 | { |
68 | if (!gSelectMgr->getSelection()->isEmpty()) | 65 | if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) |
69 | { | 66 | { |
70 | // You should already have an object selected from the mousedown. | 67 | // You should already have an object selected from the mousedown. |
71 | // If so, show its properties | 68 | // If so, show its properties |
@@ -111,17 +108,17 @@ void LLToolFace::pickCallback(S32 x, S32 y, MASK mask) | |||
111 | if ( !hit_obj->isSelected() ) | 108 | if ( !hit_obj->isSelected() ) |
112 | { | 109 | { |
113 | // object wasn't selected so add the object and face | 110 | // object wasn't selected so add the object and face |
114 | gSelectMgr->selectObjectOnly(hit_obj, hit_face); | 111 | LLSelectMgr::getInstance()->selectObjectOnly(hit_obj, hit_face); |
115 | } | 112 | } |
116 | else if (!gSelectMgr->getSelection()->contains(hit_obj, hit_face) ) | 113 | else if (!LLSelectMgr::getInstance()->getSelection()->contains(hit_obj, hit_face) ) |
117 | { | 114 | { |
118 | // object is selected, but not this face, so add it. | 115 | // object is selected, but not this face, so add it. |
119 | gSelectMgr->addAsIndividual(hit_obj, hit_face); | 116 | LLSelectMgr::getInstance()->addAsIndividual(hit_obj, hit_face); |
120 | } | 117 | } |
121 | else | 118 | else |
122 | { | 119 | { |
123 | // object is selected, as is this face, so remove the face. | 120 | // object is selected, as is this face, so remove the face. |
124 | gSelectMgr->remove(hit_obj, hit_face); | 121 | LLSelectMgr::getInstance()->remove(hit_obj, hit_face); |
125 | 122 | ||
126 | // BUG: If you remove the last face, the simulator won't know about it. | 123 | // BUG: If you remove the last face, the simulator won't know about it. |
127 | } | 124 | } |
@@ -130,15 +127,15 @@ void LLToolFace::pickCallback(S32 x, S32 y, MASK mask) | |||
130 | { | 127 | { |
131 | // clicked without modifiers, select only | 128 | // clicked without modifiers, select only |
132 | // this face | 129 | // this face |
133 | gSelectMgr->deselectAll(); | 130 | LLSelectMgr::getInstance()->deselectAll(); |
134 | gSelectMgr->selectObjectOnly(hit_obj, hit_face); | 131 | LLSelectMgr::getInstance()->selectObjectOnly(hit_obj, hit_face); |
135 | } | 132 | } |
136 | } | 133 | } |
137 | else | 134 | else |
138 | { | 135 | { |
139 | if (!(mask == MASK_SHIFT)) | 136 | if (!(mask == MASK_SHIFT)) |
140 | { | 137 | { |
141 | gSelectMgr->deselectAll(); | 138 | LLSelectMgr::getInstance()->deselectAll(); |
142 | } | 139 | } |
143 | } | 140 | } |
144 | } | 141 | } |
@@ -147,14 +144,14 @@ void LLToolFace::pickCallback(S32 x, S32 y, MASK mask) | |||
147 | void LLToolFace::handleSelect() | 144 | void LLToolFace::handleSelect() |
148 | { | 145 | { |
149 | // From now on, draw faces | 146 | // From now on, draw faces |
150 | gSelectMgr->setTEMode(TRUE); | 147 | LLSelectMgr::getInstance()->setTEMode(TRUE); |
151 | } | 148 | } |
152 | 149 | ||
153 | 150 | ||
154 | void LLToolFace::handleDeselect() | 151 | void LLToolFace::handleDeselect() |
155 | { | 152 | { |
156 | // Stop drawing faces | 153 | // Stop drawing faces |
157 | gSelectMgr->setTEMode(FALSE); | 154 | LLSelectMgr::getInstance()->setTEMode(FALSE); |
158 | } | 155 | } |
159 | 156 | ||
160 | 157 | ||