diff --git a/indra/newview/alfloaterparticleeditor.cpp b/indra/newview/alfloaterparticleeditor.cpp index ba1a018adeb7fc179feaa707088d9502b26a70c7..5a87e8a11ed4f07b8e2aa5e3a5978e70e69e4946 100644 --- a/indra/newview/alfloaterparticleeditor.cpp +++ b/indra/newview/alfloaterparticleeditor.cpp @@ -373,7 +373,7 @@ void ALFloaterParticleEditor::onClickTargetPicker() mPickTargetButton->setToggleState(TRUE); mPickTargetButton->setEnabled(FALSE); LLToolObjPicker::getInstance()->setExitCallback(onTargetPicked, this); - LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance()); + LLToolMgr::getInstanceFast()->setTransientTool(LLToolObjPicker::getInstance()); } // static @@ -383,7 +383,7 @@ void ALFloaterParticleEditor::onTargetPicked(void* userdata) const LLUUID picked = LLToolObjPicker::getInstance()->getObjectID(); - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); self->mPickTargetButton->setEnabled(TRUE); self->mPickTargetButton->setToggleState(FALSE); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index bdd91f5fc999f94c50b30e3a8ac37cb9fb87ea60..6a1d67e3df6534eaf3c03d6ff855c70393c30c64 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -579,7 +579,7 @@ void LLAgent::onAppFocusGained() // if (CAMERA_MODE_MOUSELOOK == gAgentCamera.getCameraMode()) // { // gAgentCamera.changeCameraToDefault(); -// LLToolMgr::getInstance()->clearSavedTool(); +// LLToolMgr::getInstanceFast()->clearSavedTool(); // } } @@ -2332,7 +2332,7 @@ void LLAgent::endAnimationUpdateUI() { // make sure we ask to save changes - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); if( gMorphView ) { @@ -2382,7 +2382,7 @@ void LLAgent::endAnimationUpdateUI() // JC - Added for always chat in third person option gFocusMgr.setKeyboardFocus(NULL); - LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(gMouselookToolset); mViewsPushed = TRUE; @@ -2454,7 +2454,7 @@ void LLAgent::endAnimationUpdateUI() } else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { - LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(gFaceEditToolset); if( gMorphView ) { diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index ddc014d6ea7356a89b5ed0abb18fdc1621bb0162..4b1ac2eb125129be890fd9dce814bdd49e98b8c8 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1836,7 +1836,7 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb) { if (!cb) { - LLSettingsBase::Seconds transition = LLViewerParcelMgr::getInstance()->getTeleportInProgress() ? TRANSITION_FAST : TRANSITION_DEFAULT; + LLSettingsBase::Seconds transition = LLViewerParcelMgr::getInstanceFast()->getTeleportInProgress() ? TRANSITION_FAST : TRANSITION_DEFAULT; cb = [this, transition](S32 pid, EnvironmentInfo::ptr_t envinfo) { clearEnvironment(ENV_PARCEL); @@ -1853,7 +1853,7 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb) if (!cb) { - LLSettingsBase::Seconds transition = LLViewerParcelMgr::getInstance()->getTeleportInProgress() ? TRANSITION_FAST : TRANSITION_DEFAULT; + LLSettingsBase::Seconds transition = LLViewerParcelMgr::getInstanceFast()->getTeleportInProgress() ? TRANSITION_FAST : TRANSITION_DEFAULT; cb = [this, transition](S32 pid, EnvironmentInfo::ptr_t envinfo) { recordEnvironment(pid, envinfo, transition); }; } diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 0f6d14fbea76c4f3f326b95f8910bd301931d499..3e26df497aa3436a9d3c318408c61d6286b48899 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -101,8 +101,8 @@ void LLFloaterAuction::initialize() { mParcelUpdateCapUrl.clear(); - mParcelp = LLViewerParcelMgr::getInstance()->getParcelSelection(); - LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + mParcelp = LLViewerParcelMgr::getInstanceFast()->getParcelSelection(); + LLViewerRegion* region = LLViewerParcelMgr::getInstanceFast()->getSelectionRegion(); LLParcel* parcelp = mParcelp->getParcel(); if(parcelp && region && !parcelp->getForSale()) { @@ -481,7 +481,7 @@ bool LLFloaterAuction::onSellToAnyoneConfirmed(const LLSD& notification, const L void LLFloaterAuction::doSellToAnyone() { LLParcel* parcelp = mParcelp->getParcel(); - LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + LLViewerRegion* region = LLViewerParcelMgr::getInstanceFast()->getSelectionRegion(); if (parcelp && region diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 4f6af31a735cd215f71f88deffcdd9d902e8ffe6..3ed8774cae20d54da70368700958645e86277bf9 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -423,11 +423,11 @@ void LLFloaterColorPicker::onClickPipette( ) pipette_active = !pipette_active; if (pipette_active) { - LLToolMgr::getInstance()->setTransientTool(LLToolPipette::getInstance()); + LLToolMgr::getInstanceFast()->setTransientTool(LLToolPipette::getInstance()); } else { - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); } } @@ -488,7 +488,7 @@ void LLFloaterColorPicker::draw() static LLCachedControl<F32> max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f); drawConeToOwner(mContextConeOpacity, max_opacity, mSwatch, mContextConeFadeTime, mContextConeInAlpha, mContextConeOutAlpha); - mPipetteBtn->setToggleState(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); + mPipetteBtn->setToggleState(LLToolMgr::getInstanceFast()->getCurrentTool() == LLToolPipette::getInstance()); mApplyImmediateCheck->setEnabled(mActive && mCanApplyImmediately); mSelectBtn->setEnabled(mActive); @@ -1081,8 +1081,8 @@ void LLFloaterColorPicker::setActive(BOOL active) void LLFloaterColorPicker::stopUsingPipette() { - if (LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()) + if (LLToolMgr::getInstanceFast()->getCurrentTool() == LLToolPipette::getInstanceFast()) { - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); } } diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 6fbc937dfd25f1e25f7c47dcb8fcdac86a4cf61b..5ae9abe67b9cc4a5281c6db217305cc7aedc97e3 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -418,7 +418,7 @@ void LLFloaterInspect::refresh() void LLFloaterInspect::onFocusReceived() { - LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance()); + LLToolMgr::getInstanceFast()->setTransientTool(LLToolCompInspect::getInstance()); LLFloater::onFocusReceived(); } diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index ccf3e723fd221cb336862701050449d8c4fe64f3..b31acf0095394ad8b09010ce4f33b108094eb92a 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -950,7 +950,7 @@ void LLFloaterPathfindingConsole::switchIntoTestPathMode() if (LLPathingLib::getInstance() != NULL) { llassert(mPathfindingToolset != NULL); - LLToolMgr *toolMgrInstance = LLToolMgr::getInstance(); + LLToolMgr *toolMgrInstance = LLToolMgr::getInstanceFast(); if (toolMgrInstance->getCurrentToolset() != mPathfindingToolset) { mSavedToolset = toolMgrInstance->getCurrentToolset(); @@ -964,7 +964,7 @@ void LLFloaterPathfindingConsole::switchOutOfTestPathMode() if (LLPathingLib::getInstance() != NULL) { llassert(mPathfindingToolset != NULL); - LLToolMgr *toolMgrInstance = LLToolMgr::getInstance(); + LLToolMgr *toolMgrInstance = LLToolMgr::getInstanceFast(); if (toolMgrInstance->getCurrentToolset() == mPathfindingToolset) { toolMgrInstance->setCurrentToolset(mSavedToolset); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 3eb903397a608a41f54b3f72dbbda5f1a5f73c7e..3720eb8104938d1239f0c61ae88fb7401f8828ce 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -567,8 +567,8 @@ void LLFloaterReporter::onClickCancel(void *userdata) void LLFloaterReporter::onClickObjPicker(void *userdata) { LLFloaterReporter *self = (LLFloaterReporter *)userdata; - LLToolObjPicker::getInstance()->setExitCallback(LLFloaterReporter::closePickTool, self); - LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance()); + LLToolObjPicker::getInstanceFast()->setExitCallback(LLFloaterReporter::closePickTool, self); + LLToolMgr::getInstanceFast()->setTransientTool(LLToolObjPicker::getInstanceFast()); self->mPicking = TRUE; self->getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null); self->getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null); @@ -583,10 +583,10 @@ void LLFloaterReporter::closePickTool(void *userdata) { LLFloaterReporter *self = (LLFloaterReporter *)userdata; - LLUUID object_id = LLToolObjPicker::getInstance()->getObjectID(); + LLUUID object_id = LLToolObjPicker::getInstanceFast()->getObjectID(); self->getObjectInfo(object_id); - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); self->mPicking = FALSE; LLButton* pick_btn = self->getChild<LLButton>("pick_btn"); if (pick_btn) pick_btn->setToggleState(FALSE); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 28229b41b02d0f0cbdc6380a398be1f77634c39a..6c0ef5bf444e44caf39f6b0e1075c8daf27d5d70 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -215,10 +215,10 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate // freeze everything else gSavedSettings.setBOOL("FreezeTime", TRUE); - if (LLToolMgr::getInstance()->getCurrentToolset() != gCameraToolset) + if (LLToolMgr::getInstanceFast()->getCurrentToolset() != gCameraToolset) { - floaterp->impl->mLastToolset = LLToolMgr::getInstance()->getCurrentToolset(); - LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset); + floaterp->impl->mLastToolset = LLToolMgr::getInstanceFast()->getCurrentToolset(); + LLToolMgr::getInstanceFast()->setCurrentToolset(gCameraToolset); } } else // turning off freeze frame mode @@ -241,7 +241,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate // restore last tool (e.g. pie menu, etc) if (floaterp->impl->mLastToolset) { - LLToolMgr::getInstance()->setCurrentToolset(floaterp->impl->mLastToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(floaterp->impl->mLastToolset); } } } @@ -942,7 +942,7 @@ LLFloaterSnapshotBase::~LLFloaterSnapshotBase() if (impl->mLastToolset) { - LLToolMgr::getInstance()->setCurrentToolset(impl->mLastToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(impl->mLastToolset); } delete impl; @@ -1138,7 +1138,7 @@ void LLFloaterSnapshotBase::onClose(bool app_quitting) if (impl->mLastToolset) { - LLToolMgr::getInstance()->setCurrentToolset(impl->mLastToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(impl->mLastToolset); } } @@ -1425,7 +1425,7 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) // give floater a change to handle mouse, else camera tool if (childrenHandleMouseDown(x, y, mask) == NULL) { - LLToolMgr::getInstance()->getCurrentTool()->handleMouseDown( x, y, mask ); + LLToolMgr::getInstanceFast()->getCurrentTool()->handleMouseDown( x, y, mask ); } return TRUE; } @@ -1441,7 +1441,7 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) // give floater a change to handle mouse, else camera tool if (childrenHandleMouseUp(x, y, mask) == NULL) { - LLToolMgr::getInstance()->getCurrentTool()->handleMouseUp( x, y, mask ); + LLToolMgr::getInstanceFast()->getCurrentTool()->handleMouseUp( x, y, mask ); } return TRUE; } @@ -1457,7 +1457,7 @@ BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask) // give floater a change to handle mouse, else camera tool if (childrenHandleHover(x, y, mask) == NULL) { - LLToolMgr::getInstance()->getCurrentTool()->handleHover( x, y, mask ); + LLToolMgr::getInstanceFast()->getCurrentTool()->handleHover( x, y, mask ); } return TRUE; } diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index dc866f45274f75af8ac188fcb6d4132f42e193e5..e5e2a6ff84178185918510a4ebcf4e76a181f4e2 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -74,8 +74,8 @@ BOOL LLFloaterTelehub::postBuild() void LLFloaterTelehub::onOpen(const LLSD& key) { // Show tools floater by selecting translate (select) tool - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() ); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() ); sendTelehubInfoRequest(); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index de91335ebd3aa8af0e8c3351628ead4f2938298a..866502fb23f5318ddda24de310d90f1f22e6b0e0 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -577,7 +577,7 @@ void LLFloaterTools::refresh() // Select a parcel at the currently selected object's position. if (!selected_object->isAttachment()) { - LLViewerParcelMgr::getInstance()->selectParcelAt(selected_object->getPositionGlobal()); + LLViewerParcelMgr::getInstanceFast()->selectParcelAt(selected_object->getPositionGlobal()); } else { @@ -666,7 +666,7 @@ void LLFloaterTools::resetToolState() void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) { - LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + LLTool *tool = LLToolMgr::getInstanceFast()->getCurrentTool(); // HACK to allow seeing the buttons when you have the app in a window. // Keep the visibility the same as it @@ -681,7 +681,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Focus buttons - BOOL focus_visible = ( tool == LLToolCamera::getInstance() ); + BOOL focus_visible = ( tool == LLToolCamera::getInstanceFast() ); mBtnFocus ->setToggleState( focus_visible ); @@ -715,7 +715,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) getChild<LLUICtrl>("slider zoom")->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f); // Move buttons - BOOL move_visible = (tool == LLToolGrab::getInstance()); + BOOL move_visible = (tool == LLToolGrab::getInstanceFast()); if (mBtnMove) mBtnMove ->setToggleState( move_visible ); @@ -740,13 +740,13 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Edit buttons - BOOL edit_visible = tool == LLToolCompTranslate::getInstance() || - tool == LLToolCompRotate::getInstance() || - tool == LLToolCompScale::getInstance() || - tool == LLToolFace::getInstance() || - tool == LLToolIndividual::getInstance() || - tool == ALToolAlign::getInstance() || - tool == LLToolPipette::getInstance(); + BOOL edit_visible = tool == LLToolCompTranslate::getInstanceFast() || + tool == LLToolCompRotate::getInstanceFast() || + tool == LLToolCompScale::getInstanceFast() || + tool == LLToolFace::getInstanceFast() || + tool == LLToolIndividual::getInstanceFast() || + tool == ALToolAlign::getInstanceFast() || + tool == LLToolPipette::getInstanceFast(); mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); @@ -763,7 +763,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnNextPart->setVisible(edit_visible); bool select_btn_enabled = (!LLSelectMgr::getInstanceFast()->getSelection()->isEmpty() - && (ALControlCache::EditLinkedParts || LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool())); + && (ALControlCache::EditLinkedParts || LLToolFace::getInstanceFast() == LLToolMgr::getInstanceFast()->getCurrentTool())); mBtnPrevPart->setEnabled(select_btn_enabled); mBtnNextPart->setEnabled(select_btn_enabled); @@ -773,23 +773,23 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) //mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts")); } - if ( tool == LLToolCompTranslate::getInstance() ) + if ( tool == LLToolCompTranslate::getInstanceFast() ) { mRadioGroupEdit->setValue("radio position"); } - else if ( tool == LLToolCompRotate::getInstance() ) + else if ( tool == LLToolCompRotate::getInstanceFast() ) { mRadioGroupEdit->setValue("radio rotate"); } - else if ( tool == LLToolCompScale::getInstance() ) + else if ( tool == LLToolCompScale::getInstanceFast() ) { mRadioGroupEdit->setValue("radio stretch"); } - else if ( tool == LLToolFace::getInstance() ) + else if ( tool == LLToolFace::getInstanceFast() ) { mRadioGroupEdit->setValue("radio select face"); } - else if ( tool == ALToolAlign::getInstance() ) + else if ( tool == ALToolAlign::getInstanceFast() ) { mRadioGroupEdit->setValue("radio align"); } @@ -821,8 +821,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Snap to grid disabled for grab tool - very confusing - if (mCheckSnapToGrid) mCheckSnapToGrid->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ ); - if (mBtnGridOptions) mBtnGridOptions->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ ); + if (mCheckSnapToGrid) mCheckSnapToGrid->setVisible( edit_visible /* || tool == LLToolGrab::getInstanceFast() */ ); + if (mBtnGridOptions) mBtnGridOptions->setVisible( edit_visible /* || tool == LLToolGrab::getInstanceFast() */ ); //mCheckSelectLinked ->setVisible( edit_visible ); if (mCheckStretchUniform) mCheckStretchUniform->setVisible( edit_visible ); @@ -831,13 +831,13 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckActualRoot) mCheckActualRoot->setVisible( edit_visible ); // Create buttons - BOOL create_visible = (tool == LLToolCompCreate::getInstance()); + BOOL create_visible = (tool == LLToolCompCreate::getInstanceFast()); // Tree/grass picker mTreeGrassCombo->setVisible(create_visible); if (create_visible) buildTreeGrassCombo(); - mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() ); + mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstanceFast() ); if (mCheckCopySelection && mCheckCopySelection->get()) @@ -871,18 +871,18 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckCopyRotates && mCheckCopySelection) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); // Land buttons - BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); + BOOL land_visible = (tool == LLToolBrushLand::getInstanceFast() || tool == LLToolSelectLand::getInstanceFast() ); mCostTextBorder->setVisible(!land_visible); if (mBtnLand) mBtnLand ->setToggleState( land_visible ); mRadioGroupLand->setVisible( land_visible ); - if ( tool == LLToolSelectLand::getInstance() ) + if ( tool == LLToolSelectLand::getInstanceFast() ) { mRadioGroupLand->setValue("radio select land"); } - else if ( tool == LLToolBrushLand::getInstance() ) + else if ( tool == LLToolBrushLand::getInstanceFast() ) { S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction"); switch(dozer_mode) @@ -913,7 +913,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mBtnApplyToSelection) { mBtnApplyToSelection->setVisible( land_visible ); - mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstance()->selectionEmpty() && tool != LLToolSelectLand::getInstance()); + mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstanceFast()->selectionEmpty() && tool != LLToolSelectLand::getInstanceFast()); } if (mSliderDozerSize) { @@ -948,7 +948,7 @@ BOOL LLFloaterTools::canClose() // virtual void LLFloaterTools::onOpen(const LLSD& key) { - mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection(); + mParcelSelection = LLViewerParcelMgr::getInstanceFast()->getFloatingParcelSelection(); mObjectSelection = LLSelectMgr::getInstanceFast()->getEditSelection(); std::string panel = key.asString(); @@ -957,9 +957,9 @@ void LLFloaterTools::onOpen(const LLSD& key) mTab->selectTabByName(panel); } - LLTool* tool = LLToolMgr::getInstance()->getCurrentTool(); - if (tool == LLToolCompInspect::getInstance() - || tool == LLToolDragAndDrop::getInstance()) + LLTool* tool = LLToolMgr::getInstanceFast()->getCurrentTool(); + if (tool == LLToolCompInspect::getInstanceFast() + || tool == LLToolDragAndDrop::getInstanceFast()) { // Something called floater up while it was supressed (during drag n drop, inspect), // so it won't be getting any layout or visibility updates, update once @@ -977,7 +977,7 @@ void LLFloaterTools::onClose(bool app_quitting) { mTab->setVisible(FALSE); - LLViewerJoystick::getInstance()->moveAvatar(false); + LLViewerJoystick::getInstanceFast()->moveAvatar(false); // destroy media source used to grab media title if( mTitleMedia ) @@ -999,10 +999,10 @@ void LLFloaterTools::onClose(bool app_quitting) mObjectSelection = NULL; // Switch back to basic toolset - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); // we were already in basic toolset, using build tools // so manually reset tool to default (pie menu tool) - LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool(); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectFirstTool(); //gMenuBarView->setItemVisible("BuildTools", FALSE); LLFloaterReg::hideInstance("media_settings"); @@ -1090,7 +1090,7 @@ void commit_slider_dozer_force(LLUICtrl *ctrl) void click_apply_to_selection(void*) { - LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal(); + LLToolBrushLand::getInstanceFast()->modifyLandInSelectionGlobal(); } void commit_radio_group_edit(LLUICtrl *ctrl) @@ -1101,23 +1101,23 @@ void commit_radio_group_edit(LLUICtrl *ctrl) std::string selected = group->getValue().asString(); if (selected == "radio position") { - LLFloaterTools::setEditTool( LLToolCompTranslate::getInstance() ); + LLFloaterTools::setEditTool( LLToolCompTranslate::getInstanceFast() ); } else if (selected == "radio rotate") { - LLFloaterTools::setEditTool( LLToolCompRotate::getInstance() ); + LLFloaterTools::setEditTool( LLToolCompRotate::getInstanceFast() ); } else if (selected == "radio stretch") { - LLFloaterTools::setEditTool( LLToolCompScale::getInstance() ); + LLFloaterTools::setEditTool( LLToolCompScale::getInstanceFast() ); } else if (selected == "radio select face") { - LLFloaterTools::setEditTool( LLToolFace::getInstance() ); + LLFloaterTools::setEditTool( LLToolFace::getInstanceFast() ); } else if (selected == "radio align") { - LLFloaterTools::setEditTool( ALToolAlign::getInstance() ); + LLFloaterTools::setEditTool( ALToolAlign::getInstanceFast() ); } gSavedSettings.setBOOL("ShowParcelOwners", show_owners); } @@ -1128,11 +1128,11 @@ void commit_radio_group_land(LLUICtrl* ctrl) std::string selected = group->getValue().asString(); if (selected == "radio select land") { - LLFloaterTools::setEditTool( LLToolSelectLand::getInstance() ); + LLFloaterTools::setEditTool( LLToolSelectLand::getInstanceFast() ); } else { - LLFloaterTools::setEditTool( LLToolBrushLand::getInstance() ); + LLFloaterTools::setEditTool( LLToolBrushLand::getInstanceFast() ); S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction"); if (selected == "radio flatten") dozer_mode = 0; @@ -1213,29 +1213,29 @@ void LLFloaterTools::onClickGridOptions() void LLFloaterTools::setEditTool(void* tool_pointer) { LLTool *tool = (LLTool *)tool_pointer; - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( tool ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( tool ); } void LLFloaterTools::setTool(const LLSD& user_data) { std::string control_name = user_data.asString(); if(control_name == "Focus") - LLToolMgr::getInstance()->getCurrentToolset()->selectTool((LLTool *) LLToolCamera::getInstance() ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool((LLTool *) LLToolCamera::getInstanceFast() ); else if (control_name == "Move" ) - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool *)LLToolGrab::getInstance() ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( (LLTool *)LLToolGrab::getInstanceFast() ); else if (control_name == "Edit" ) - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool *) LLToolCompTranslate::getInstance()); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( (LLTool *) LLToolCompTranslate::getInstanceFast()); else if (control_name == "Create" ) - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool *) LLToolCompCreate::getInstance()); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( (LLTool *) LLToolCompCreate::getInstanceFast()); else if (control_name == "Land" ) - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool *) LLToolSelectLand::getInstance()); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( (LLTool *) LLToolSelectLand::getInstanceFast()); else LL_WARNS()<<" no parameter name "<<control_name<<" found!! No Tool selected!!"<< LL_ENDL; } void LLFloaterTools::onFocusReceived() { - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); LLFloater::onFocusReceived(); } @@ -1294,7 +1294,7 @@ void LLFloaterTools::updateLandImpacts() S32 rezzed_prims = parcel->getSimWidePrimCount(); S32 total_capacity = parcel->getSimWideMaxPrimCapacity(); - LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + LLViewerRegion* region = LLViewerParcelMgr::getInstanceFast()->getSelectionRegion(); if (region) { S32 max_tasks_per_region = (S32)region->getMaxTasks(); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index a810e33f73aa783f314332555fc033a3e2f20516..6638ee0faed8990535d88b71179cb3ee8d91b6b3 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -205,9 +205,9 @@ void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b) void LLFloaterTexturePicker::stopUsingPipette() { - if (LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()) + if (LLToolMgr::getInstanceFast()->getCurrentTool() == LLToolPipette::getInstanceFast()) { - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); } } @@ -434,7 +434,7 @@ BOOL LLFloaterTexturePicker::postBuild() updateFilterPermMask(); mSavedFolderState.setApply(FALSE); - LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1)); + LLToolPipette::getInstanceFast()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1)); getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this); getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setCommitCallback(onHideBaseMeshRegionCheck, this); @@ -455,7 +455,7 @@ void LLFloaterTexturePicker::draw() getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected); getChildView("Select")->setEnabled(mActive && mCanApply); getChildView("Pipette")->setEnabled(mActive); - getChild<LLUICtrl>("Pipette")->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); + getChild<LLUICtrl>("Pipette")->setValue(LLToolMgr::getInstanceFast()->getCurrentTool() == LLToolPipette::getInstanceFast()); //BOOL allow_copy = FALSE; if( mOwner ) @@ -723,11 +723,11 @@ void LLFloaterTexturePicker::onBtnPipette() pipette_active = !pipette_active; if (pipette_active) { - LLToolMgr::getInstance()->setTransientTool(LLToolPipette::getInstance()); + LLToolMgr::getInstanceFast()->setTransientTool(LLToolPipette::getInstance()); } else { - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); } } diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index fe9680f22fbd961094fe0188444e606143942540..c728081cec62b287797efca539fbbfe6a454430c 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -193,12 +193,12 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, void LLToolBrushLand::modifyLandInSelectionGlobal() { - if (LLViewerParcelMgr::getInstance()->selectionEmpty()) + if (LLViewerParcelMgr::getInstanceFast()->selectionEmpty()) { return; } - if (LLToolMgr::getInstance()->getCurrentTool() == LLToolSelectLand::getInstance()) + if (LLToolMgr::getInstanceFast()->getCurrentTool() == LLToolSelectLand::getInstanceFast()) { // selecting land, don't do anything return; @@ -624,7 +624,7 @@ void LLToolBrushLand::onIdle( void* brush_tool ) { LLToolBrushLand* self = static_cast<LLToolBrushLand*>(brush_tool); - if( LLToolMgr::getInstance()->getCurrentTool() == self ) + if( LLToolMgr::getInstanceFast()->getCurrentTool() == self ) { self->brush(); } diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 4b133877e4f1ad6286de9f2b01128ffc8e536ed1..24930e21cd96d1b9fd06d8768b269839e355e36b 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -756,7 +756,7 @@ BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask) // On mousedown, start grabbing gGrabTransientTool = this; - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool*) mGrab ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( (LLTool*) mGrab ); return LLToolGrab::getInstance()->handleMouseDown(x, y, mask); } @@ -773,9 +773,9 @@ BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask) // On mousedown, start grabbing gGrabTransientTool = this; - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool*) mGrab ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( (LLTool*) mGrab ); - return LLToolGrab::getInstance()->handleDoubleClick(x, y, mask); + return LLToolGrab::getInstanceFast()->handleDoubleClick(x, y, mask); } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index ff40c77d3aad388ffb210d500c08ff106d5c3d36..83d54fe09710251938df4625ce1e7dd72deaf5f7 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -330,7 +330,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, mObjectID = object_id; setMouseCapture( TRUE ); - LLToolMgr::getInstance()->setTransientTool( this ); + LLToolMgr::getInstanceFast()->setTransientTool( this ); mCursor = UI_CURSOR_NO; if ((mCargoTypes[0] == DAD_CATEGORY) && ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY))) @@ -400,7 +400,7 @@ void LLToolDragAndDrop::beginMultiDrag( mSourceID = source_id; setMouseCapture( TRUE ); - LLToolMgr::getInstance()->setTransientTool( this ); + LLToolMgr::getInstanceFast()->setTransientTool( this ); mCursor = UI_CURSOR_NO; if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) { @@ -454,7 +454,7 @@ void LLToolDragAndDrop::endDrag() void LLToolDragAndDrop::onMouseCaptureLost() { // Called whenever the drag ends or if mouse capture is simply lost - LLToolMgr::getInstance()->clearTransientTool(); + LLToolMgr::getInstanceFast()->clearTransientTool(); mCargoTypes.clear(); mCargoIDs.clear(); mSource = SOURCE_AGENT; @@ -1303,7 +1303,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLUUID source_id = from_task_inventory ? mSourceID : LLUUID::null; // Select the object only if we're editing. - BOOL rez_selected = LLToolMgr::getInstance()->inEdit(); + BOOL rez_selected = LLToolMgr::getInstanceFast()->inEdit(); LLVector3 ray_start = regionp->getPosRegionFromGlobal(mLastCameraPos); diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index fb4349f55c94c7bacedbe7f7aa25328fba86a232..39e588d9e0c2b439a0b83912e20ff70145654247 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -490,7 +490,7 @@ void LLToolset::addTool(LLTool* tool) void LLToolset::selectTool(LLTool* tool) { mSelectedTool = tool; - LLToolMgr::getInstance()->setCurrentTool( mSelectedTool ); + LLToolMgr::getInstanceFast()->setCurrentTool( mSelectedTool ); } @@ -500,7 +500,7 @@ void LLToolset::selectToolByIndex( S32 index ) if (tool) { mSelectedTool = tool; - LLToolMgr::getInstance()->setCurrentTool( tool ); + LLToolMgr::getInstanceFast()->setCurrentTool( tool ); } } @@ -514,7 +514,7 @@ BOOL LLToolset::isToolSelected( S32 index ) void LLToolset::selectFirstTool() { mSelectedTool = (0 < mToolList.size()) ? mToolList[0] : NULL; - LLToolMgr::getInstance()->setCurrentTool( mSelectedTool ); + LLToolMgr::getInstanceFast()->setCurrentTool( mSelectedTool ); } @@ -535,7 +535,7 @@ void LLToolset::selectNextTool() if( next ) { mSelectedTool = next; - LLToolMgr::getInstance()->setCurrentTool( mSelectedTool ); + LLToolMgr::getInstanceFast()->setCurrentTool( mSelectedTool ); } else { @@ -560,7 +560,7 @@ void LLToolset::selectPrevTool() if( prev ) { mSelectedTool = prev; - LLToolMgr::getInstance()->setCurrentTool( mSelectedTool ); + LLToolMgr::getInstanceFast()->setCurrentTool( mSelectedTool ); } else if (mToolList.size() > 0) { diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index ff95190241ef1adc6d246d589d6b07c58f21ef45..cd1cecacc7c47c8982b6794400e30e4f65cb83a4 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1506,7 +1506,7 @@ void LLToolPie::playCurrentMedia(const LLPickInfo& info) void LLToolPie::VisitHomePage(const LLPickInfo& info) { //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return; LLPointer<LLViewerObject> objectp = info.getObject(); diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 97d9954c7e9273f82bbdcc74513ca0e5b8d901c9..a46676e8932fed87858ac3c8e009bb9289cfe391 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -561,7 +561,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) // ...and go back to the default tool if (added && !gSavedSettings.getBOOL("CreateToolKeepSelected")) { - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() ); } return added; diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 1ee7cbb6e7648e3d05436ee4d6fc99de839ffd9f..3fabcd357a2843abca2445f9307fbf6e40d21905 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -1108,12 +1108,12 @@ void LLViewerJoystick::moveFlycam(bool reset) gSavedSettings.getS32("JoystickAxis6") }; - bool in_build_mode = LLToolMgr::getInstance()->inBuildMode(); + bool in_build_mode = LLToolMgr::getInstanceFast()->inBuildMode(); if (reset || mResetFlag) { - sFlycamPosition = LLViewerCamera::getInstance()->getOrigin(); - sFlycamRotation = LLViewerCamera::getInstance()->getQuaternion(); - sFlycamZoom = LLViewerCamera::getInstance()->getView(); + sFlycamPosition = LLViewerCamera::getInstanceFast()->getOrigin(); + sFlycamRotation = LLViewerCamera::getInstanceFast()->getQuaternion(); + sFlycamZoom = LLViewerCamera::getInstanceFast()->getView(); resetDeltas(axis); @@ -1318,7 +1318,7 @@ void LLViewerJoystick::scanJoystick() toggle_flycam = 0; } - if (!mOverrideCamera && !(LLToolMgr::getInstance()->inBuildMode() && gSavedSettings.getBOOL("JoystickBuildEnabled"))) + if (!mOverrideCamera && !(LLToolMgr::getInstanceFast()->inBuildMode() && gSavedSettings.getBOOL("JoystickBuildEnabled"))) { moveAvatar(); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7a2f477f7626be25627263775c034d96edf2fee3..49bc105bf0ba314322955160a4376b18fcd9a620 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2832,23 +2832,23 @@ class LLObjectBuild : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstanceFast()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); - gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstanceFast()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { - gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstanceFast()->getPick()); gViewerWindow->moveCursorToCenter(); } - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstanceFast() ); // Could be first use //LLFirstUse::useBuild(); @@ -2858,9 +2858,9 @@ class LLObjectBuild : public view_listener_t void handle_object_edit() { - LLViewerParcelMgr::getInstance()->deselectLand(); + LLViewerParcelMgr::getInstanceFast()->deselectLand(); - if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstanceFast()->inEdit()) { LLFloaterTools::sPreviousFocusOnAvatar = true; LLObjectSelectionHandle selection = LLSelectMgr::getInstanceFast()->getSelection(); @@ -2889,8 +2889,8 @@ void handle_object_edit() LLFloaterReg::showInstance("build"); - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - gFloaterTools->setEditTool( LLToolCompTranslate::getInstance() ); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); + gFloaterTools->setEditTool( LLToolCompTranslate::getInstanceFast() ); LLViewerJoystick::getInstance()->moveObjects(true); LLViewerJoystick::getInstance()->setNeedsReset(true); @@ -2923,7 +2923,7 @@ void handle_attachment_touch(const LLUUID& inv_item_id) LLSelectMgr::getInstanceFast()->deselectAll(); LLObjectSelectionHandle sel = LLSelectMgr::getInstanceFast()->selectObjectAndFamily(attach_obj); - if (!LLToolMgr::getInstance()->inBuildMode()) + if (!LLToolMgr::getInstanceFast()->inBuildMode()) { struct SetTransient : public LLSelectedNodeFunctor { @@ -2980,11 +2980,11 @@ class LLLandBuild : public view_listener_t { LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstanceFast()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); - gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstanceFast()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); @@ -2997,8 +2997,8 @@ class LLLandBuild : public view_listener_t } - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); + LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstanceFast() ); // Could be first use //LLFirstUse::useBuild(); @@ -5396,7 +5396,7 @@ class LLToolsEnableSelectNextPart : public view_listener_t { bool new_value = (!LLSelectMgr::getInstanceFast()->getSelection()->isEmpty() && (ALControlCache::EditLinkedParts - || LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool())); + || LLToolFace::getInstanceFast() == LLToolMgr::getInstanceFast()->getCurrentTool())); return new_value; } }; @@ -5408,7 +5408,7 @@ class LLToolsSelectNextPartFace : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool cycle_faces = LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool(); + bool cycle_faces = LLToolFace::getInstanceFast() == LLToolMgr::getInstanceFast()->getCurrentTool(); bool cycle_linked = ALControlCache::EditLinkedParts; if (!cycle_faces && !cycle_linked) @@ -6881,7 +6881,7 @@ class LLLandEdit : public view_listener_t LLFloaterReg::showInstance("build"); // Switch to land edit toolset - LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolSelectLand::getInstance() ); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectTool( LLToolSelectLand::getInstance() ); return true; } }; @@ -8133,7 +8133,7 @@ class LLToolsEnableToolNotPie : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = ( LLToolMgr::getInstance()->getBaseTool() != LLToolPie::getInstance() ); + bool new_value = ( LLToolMgr::getInstanceFast()->getBaseTool() != LLToolPie::getInstanceFast() ); return new_value; } }; @@ -8981,23 +8981,23 @@ class LLToolsSelectTool : public view_listener_t std::string tool_name = userdata.asString(); if (tool_name == "focus") { - LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(1); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectToolByIndex(1); } else if (tool_name == "move") { - LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(2); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectToolByIndex(2); } else if (tool_name == "edit") { - LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(3); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectToolByIndex(3); } else if (tool_name == "create") { - LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(4); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectToolByIndex(4); } else if (tool_name == "land") { - LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(5); + LLToolMgr::getInstanceFast()->getCurrentToolset()->selectToolByIndex(5); } // Note: if floater is not visible LLViewerWindow::updateLayout() will