diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/lltoolcomp.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/lltoolcomp.cpp')
-rw-r--r-- | linden/indra/newview/lltoolcomp.cpp | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/linden/indra/newview/lltoolcomp.cpp b/linden/indra/newview/lltoolcomp.cpp index 0ef710d..8898dcb 100644 --- a/linden/indra/newview/lltoolcomp.cpp +++ b/linden/indra/newview/lltoolcomp.cpp | |||
@@ -167,7 +167,7 @@ void LLToolCompInspect::pickCallback(S32 x, S32 y, MASK mask) | |||
167 | 167 | ||
168 | if( hit_obj ) | 168 | if( hit_obj ) |
169 | { | 169 | { |
170 | if (gSelectMgr->getObjectCount()) | 170 | if (gSelectMgr->getSelection()->getObjectCount()) |
171 | { | 171 | { |
172 | gEditMenuHandler = gSelectMgr; | 172 | gEditMenuHandler = gSelectMgr; |
173 | } | 173 | } |
@@ -223,7 +223,7 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask) | |||
223 | BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) | 223 | BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) |
224 | { | 224 | { |
225 | mMouseDown = TRUE; | 225 | mMouseDown = TRUE; |
226 | gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback); | 226 | gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback, TRUE); |
227 | return TRUE; | 227 | return TRUE; |
228 | } | 228 | } |
229 | 229 | ||
@@ -241,7 +241,7 @@ void LLToolCompTranslate::pickCallback(S32 x, S32 y, MASK mask) | |||
241 | 241 | ||
242 | if( hit_obj || gToolTranslate->mManip->getHighlightedPart() != LLManip::LL_NO_PART ) | 242 | if( hit_obj || gToolTranslate->mManip->getHighlightedPart() != LLManip::LL_NO_PART ) |
243 | { | 243 | { |
244 | if (gSelectMgr->getObjectCount()) | 244 | if (gToolTranslate->mManip->getSelection()->getObjectCount()) |
245 | { | 245 | { |
246 | gEditMenuHandler = gSelectMgr; | 246 | gEditMenuHandler = gSelectMgr; |
247 | } | 247 | } |
@@ -272,9 +272,22 @@ BOOL LLToolCompTranslate::handleMouseUp(S32 x, S32 y, MASK mask) | |||
272 | return LLToolComposite::handleMouseUp(x, y, mask); | 272 | return LLToolComposite::handleMouseUp(x, y, mask); |
273 | } | 273 | } |
274 | 274 | ||
275 | LLTool* LLToolCompTranslate::getOverrideTool(MASK mask) | ||
276 | { | ||
277 | if (mask == MASK_CONTROL) | ||
278 | { | ||
279 | return gToolRotate; | ||
280 | } | ||
281 | else if (mask == (MASK_CONTROL | MASK_SHIFT)) | ||
282 | { | ||
283 | return gToolStretch; | ||
284 | } | ||
285 | return LLToolComposite::getOverrideTool(mask); | ||
286 | } | ||
287 | |||
275 | BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask) | 288 | BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask) |
276 | { | 289 | { |
277 | if (!gSelectMgr->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) | 290 | if (mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) |
278 | { | 291 | { |
279 | // You should already have an object selected from the mousedown. | 292 | // You should already have an object selected from the mousedown. |
280 | // If so, show its properties | 293 | // If so, show its properties |
@@ -350,7 +363,7 @@ void LLToolCompScale::pickCallback(S32 x, S32 y, MASK mask) | |||
350 | 363 | ||
351 | if( hit_obj || gToolStretch->mManip->getHighlightedPart() != LLManip::LL_NO_PART) | 364 | if( hit_obj || gToolStretch->mManip->getHighlightedPart() != LLManip::LL_NO_PART) |
352 | { | 365 | { |
353 | if (gSelectMgr->getObjectCount()) | 366 | if (gToolStretch->mManip->getSelection()->getObjectCount()) |
354 | { | 367 | { |
355 | gEditMenuHandler = gSelectMgr; | 368 | gEditMenuHandler = gSelectMgr; |
356 | } | 369 | } |
@@ -378,9 +391,20 @@ BOOL LLToolCompScale::handleMouseUp(S32 x, S32 y, MASK mask) | |||
378 | return LLToolComposite::handleMouseUp(x, y, mask); | 391 | return LLToolComposite::handleMouseUp(x, y, mask); |
379 | } | 392 | } |
380 | 393 | ||
394 | LLTool* LLToolCompScale::getOverrideTool(MASK mask) | ||
395 | { | ||
396 | if (mask == MASK_CONTROL) | ||
397 | { | ||
398 | return gToolRotate; | ||
399 | } | ||
400 | |||
401 | return LLToolComposite::getOverrideTool(mask); | ||
402 | } | ||
403 | |||
404 | |||
381 | BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask) | 405 | BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask) |
382 | { | 406 | { |
383 | if (!gSelectMgr->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) | 407 | if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) |
384 | { | 408 | { |
385 | // You should already have an object selected from the mousedown. | 409 | // You should already have an object selected from the mousedown. |
386 | // If so, show its properties | 410 | // If so, show its properties |
@@ -480,6 +504,11 @@ BOOL LLToolCompCreate::handleMouseUp(S32 x, S32 y, MASK mask) | |||
480 | mObjectPlacedOnMouseDown = FALSE; | 504 | mObjectPlacedOnMouseDown = FALSE; |
481 | mMouseDown = FALSE; | 505 | mMouseDown = FALSE; |
482 | 506 | ||
507 | if (!handled) | ||
508 | { | ||
509 | handled = LLToolComposite::handleMouseUp(x, y, mask); | ||
510 | } | ||
511 | |||
483 | return handled; | 512 | return handled; |
484 | } | 513 | } |
485 | 514 | ||
@@ -534,7 +563,7 @@ void LLToolCompRotate::pickCallback(S32 x, S32 y, MASK mask) | |||
534 | 563 | ||
535 | if( hit_obj || gToolRotate->mManip->getHighlightedPart() != LLManip::LL_NO_PART) | 564 | if( hit_obj || gToolRotate->mManip->getHighlightedPart() != LLManip::LL_NO_PART) |
536 | { | 565 | { |
537 | if (gSelectMgr->getObjectCount()) | 566 | if (gToolRotate->mManip->getSelection()->getObjectCount()) |
538 | { | 567 | { |
539 | gEditMenuHandler = gSelectMgr; | 568 | gEditMenuHandler = gSelectMgr; |
540 | } | 569 | } |
@@ -562,10 +591,18 @@ BOOL LLToolCompRotate::handleMouseUp(S32 x, S32 y, MASK mask) | |||
562 | return LLToolComposite::handleMouseUp(x, y, mask); | 591 | return LLToolComposite::handleMouseUp(x, y, mask); |
563 | } | 592 | } |
564 | 593 | ||
594 | LLTool* LLToolCompRotate::getOverrideTool(MASK mask) | ||
595 | { | ||
596 | if (mask == (MASK_CONTROL | MASK_SHIFT)) | ||
597 | { | ||
598 | return gToolStretch; | ||
599 | } | ||
600 | return LLToolComposite::getOverrideTool(mask); | ||
601 | } | ||
565 | 602 | ||
566 | BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask) | 603 | BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask) |
567 | { | 604 | { |
568 | if (!gSelectMgr->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) | 605 | if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) |
569 | { | 606 | { |
570 | // You should already have an object selected from the mousedown. | 607 | // You should already have an object selected from the mousedown. |
571 | // If so, show its properties | 608 | // If so, show its properties |
@@ -668,7 +705,7 @@ BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask) | |||
668 | 705 | ||
669 | // On mousedown, start grabbing | 706 | // On mousedown, start grabbing |
670 | gGrabTransientTool = this; | 707 | gGrabTransientTool = this; |
671 | gCurrentToolset->selectTool( (LLTool*) mGrab ); | 708 | gToolMgr->getCurrentToolset()->selectTool( (LLTool*) mGrab ); |
672 | 709 | ||
673 | return gToolGrab->handleMouseDown(x, y, mask); | 710 | return gToolGrab->handleMouseDown(x, y, mask); |
674 | } | 711 | } |
@@ -685,7 +722,7 @@ BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
685 | 722 | ||
686 | // On mousedown, start grabbing | 723 | // On mousedown, start grabbing |
687 | gGrabTransientTool = this; | 724 | gGrabTransientTool = this; |
688 | gCurrentToolset->selectTool( (LLTool*) mGrab ); | 725 | gToolMgr->getCurrentToolset()->selectTool( (LLTool*) mGrab ); |
689 | 726 | ||
690 | return gToolGrab->handleDoubleClick(x, y, mask); | 727 | return gToolGrab->handleDoubleClick(x, y, mask); |
691 | } | 728 | } |