diff options
Diffstat (limited to 'linden/indra/newview/llfloatersnapshot.cpp')
-rw-r--r-- | linden/indra/newview/llfloatersnapshot.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 01f86af..cfa94a5 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp | |||
@@ -824,21 +824,22 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) | |||
824 | 824 | ||
825 | //RN: freeze all avatars | 825 | //RN: freeze all avatars |
826 | LLCharacter* avatarp; | 826 | LLCharacter* avatarp; |
827 | for (avatarp = LLCharacter::sInstances.getFirstData(); avatarp; avatarp = LLCharacter::sInstances.getNextData()) | 827 | for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); |
828 | iter != LLCharacter::sInstances.end(); ++iter) | ||
828 | { | 829 | { |
830 | avatarp = *iter; | ||
829 | sInstance->impl.mAvatarPauseHandles.push_back(avatarp->requestPause()); | 831 | sInstance->impl.mAvatarPauseHandles.push_back(avatarp->requestPause()); |
830 | } | 832 | } |
831 | 833 | ||
832 | // freeze everything else | 834 | // freeze everything else |
833 | gSavedSettings.setBOOL("FreezeTime", TRUE); | 835 | gSavedSettings.setBOOL("FreezeTime", TRUE); |
834 | 836 | ||
835 | if (gCurrentToolset != gCameraToolset) | 837 | if (gToolMgr->getCurrentToolset() != gCameraToolset) |
836 | { | 838 | { |
837 | sInstance->impl.mLastToolset = gCurrentToolset; | 839 | sInstance->impl.mLastToolset = gToolMgr->getCurrentToolset(); |
838 | gCurrentToolset = gCameraToolset; | ||
839 | if (gToolMgr) | 840 | if (gToolMgr) |
840 | { | 841 | { |
841 | gToolMgr->useSelectedTool( gCurrentToolset ); | 842 | gToolMgr->setCurrentToolset(gCameraToolset); |
842 | } | 843 | } |
843 | } | 844 | } |
844 | } | 845 | } |
@@ -861,10 +862,9 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) | |||
861 | // restore last tool (e.g. pie menu, etc) | 862 | // restore last tool (e.g. pie menu, etc) |
862 | if (sInstance->impl.mLastToolset) | 863 | if (sInstance->impl.mLastToolset) |
863 | { | 864 | { |
864 | gCurrentToolset = sInstance->impl.mLastToolset; | ||
865 | if (gToolMgr) | 865 | if (gToolMgr) |
866 | { | 866 | { |
867 | gToolMgr->useSelectedTool( gCurrentToolset ); | 867 | gToolMgr->setCurrentToolset(sInstance->impl.mLastToolset); |
868 | } | 868 | } |
869 | } | 869 | } |
870 | } | 870 | } |
@@ -1239,10 +1239,9 @@ LLFloaterSnapshot::~LLFloaterSnapshot() | |||
1239 | 1239 | ||
1240 | if (impl.mLastToolset) | 1240 | if (impl.mLastToolset) |
1241 | { | 1241 | { |
1242 | gCurrentToolset = impl.mLastToolset; | 1242 | if (gToolMgr) |
1243 | if (gToolMgr && gCurrentToolset) | ||
1244 | { | 1243 | { |
1245 | gToolMgr->useSelectedTool( gCurrentToolset ); | 1244 | gToolMgr->setCurrentToolset(impl.mLastToolset); |
1246 | } | 1245 | } |
1247 | } | 1246 | } |
1248 | 1247 | ||
@@ -1432,7 +1431,7 @@ void LLFloaterSnapshot::show(void*) | |||
1432 | sInstance->impl.updateLayout(sInstance); | 1431 | sInstance->impl.updateLayout(sInstance); |
1433 | } | 1432 | } |
1434 | 1433 | ||
1435 | sInstance->open(); | 1434 | sInstance->open(); /* Flawfinder: ignore */ |
1436 | sInstance->focusFirstItem(FALSE); | 1435 | sInstance->focusFirstItem(FALSE); |
1437 | gSnapshotFloaterView->setEnabled(TRUE); | 1436 | gSnapshotFloaterView->setEnabled(TRUE); |
1438 | gSnapshotFloaterView->adjustToFitScreen(sInstance, FALSE); | 1437 | gSnapshotFloaterView->adjustToFitScreen(sInstance, FALSE); |
@@ -1506,7 +1505,7 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) | |||
1506 | // give floater a change to handle mouse, else camera tool | 1505 | // give floater a change to handle mouse, else camera tool |
1507 | if (childrenHandleMouseDown(x, y, mask) == NULL) | 1506 | if (childrenHandleMouseDown(x, y, mask) == NULL) |
1508 | { | 1507 | { |
1509 | gToolMgr->getCurrentTool(mask)->handleMouseDown( x, y, mask ); | 1508 | gToolMgr->getCurrentTool()->handleMouseDown( x, y, mask ); |
1510 | } | 1509 | } |
1511 | return TRUE; | 1510 | return TRUE; |
1512 | } | 1511 | } |
@@ -1521,7 +1520,7 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) | |||
1521 | // give floater a change to handle mouse, else camera tool | 1520 | // give floater a change to handle mouse, else camera tool |
1522 | if (childrenHandleMouseUp(x, y, mask) == NULL) | 1521 | if (childrenHandleMouseUp(x, y, mask) == NULL) |
1523 | { | 1522 | { |
1524 | gToolMgr->getCurrentTool(mask)->handleMouseUp( x, y, mask ); | 1523 | gToolMgr->getCurrentTool()->handleMouseUp( x, y, mask ); |
1525 | } | 1524 | } |
1526 | return TRUE; | 1525 | return TRUE; |
1527 | } | 1526 | } |
@@ -1536,7 +1535,7 @@ BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask) | |||
1536 | // give floater a change to handle mouse, else camera tool | 1535 | // give floater a change to handle mouse, else camera tool |
1537 | if (childrenHandleHover(x, y, mask) == NULL) | 1536 | if (childrenHandleHover(x, y, mask) == NULL) |
1538 | { | 1537 | { |
1539 | gToolMgr->getCurrentTool(mask)->handleHover( x, y, mask ); | 1538 | gToolMgr->getCurrentTool()->handleHover( x, y, mask ); |
1540 | } | 1539 | } |
1541 | return TRUE; | 1540 | return TRUE; |
1542 | } | 1541 | } |