diff options
-rw-r--r-- | indra/llui/lltextbase.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 19 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.h | 3 | ||||
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 32 |
4 files changed, 20 insertions, 36 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index c1b01f420b..778b253c3c 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -483,7 +483,7 @@ std::vector<std::pair<LLRect, LLUIColor>> LLTextBase::getHighlightedBgRects() F32 left_precise = (F32)line_iter->mRect.mLeft; F32 right_precise = (F32)line_iter->mRect.mLeft; - for (; segment_iter != mSegments.end(); ++segment_iter) + for (; segment_iter != mSegments.end(); ++segment_iter, segment_offset = 0) { LLTextSegmentPtr segmentp = *segment_iter; diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index b84b0b3a8c..98b7d74cd2 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -69,7 +69,6 @@ const S32 GALLERY_ITEMS_PER_ROW_MIN = 2; LLOutfitGallery::LLOutfitGallery(const LLOutfitGallery::Params& p) : LLOutfitListBase(), - mOutfitsObserver(NULL), mScrollPanel(NULL), mGalleryPanel(NULL), mLastRowPanel(NULL), @@ -730,12 +729,6 @@ LLOutfitGallery::~LLOutfitGallery() { delete mOutfitGalleryMenu; - if (gInventory.containsObserver(mOutfitsObserver)) - { - gInventory.removeObserver(mOutfitsObserver); - } - delete mOutfitsObserver; - while (!mUnusedRowPanels.empty()) { LLPanel* panelp = mUnusedRowPanels.back(); @@ -797,7 +790,7 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id) { // Assume a subfolder that contains or will contain outfits, track it const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - mOutfitsObserver->addCategory(cat_id, [this, outfits]() + mCategoriesObserver->addCategory(cat_id, [this, outfits]() { observerCallback(outfits); }); @@ -820,14 +813,8 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id) if (!outfit_category) return; - if (mOutfitsObserver == NULL) - { - mOutfitsObserver = new LLInventoryCategoriesObserver(); - gInventory.addObserver(mOutfitsObserver); - } - // Start observing changes in "My Outfits" category. - mOutfitsObserver->addCategory(cat_id, + mCategoriesObserver->addCategory(cat_id, boost::bind(&LLOutfitGallery::refreshOutfit, this, cat_id), true); outfit_category->fetch(); @@ -840,7 +827,7 @@ void LLOutfitGallery::updateRemovedCategory(LLUUID cat_id) if (outfits_iter != mOutfitMap.end()) { // 0. Remove category from observer. - mOutfitsObserver->removeCategory(cat_id); + mCategoriesObserver->removeCategory(cat_id); //const LLUUID& outfit_id = outfits_iter->first; LLOutfitGalleryItem* item = outfits_iter->second; diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 541ea2f9d4..a2a5fe26eb 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -184,9 +184,6 @@ private: typedef item_num_map_t::value_type item_numb_map_value_t; item_num_map_t mItemIndexMap; std::map<S32, LLOutfitGalleryItem*> mIndexToItemMap; - - - LLInventoryCategoriesObserver* mOutfitsObserver; }; class LLOutfitGalleryContextMenu : public LLOutfitContextMenu { diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index c2b74eb1dd..facda1d876 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -985,7 +985,10 @@ void LLWebRTCVoiceClient::updatePosition(void) LLWebRTCVoiceClient::participantStatePtr_t participant = findParticipantByID("Estate", gAgentID); if(participant) { - participant->mRegion = gAgent.getRegion()->getRegionID(); + if (participant->mRegion != region->getRegionID()) { + participant->mRegion = region->getRegionID(); + setMuteMic(mMuteMic); + } } } } @@ -3104,23 +3107,20 @@ LLVoiceWebRTCSpatialConnection::~LLVoiceWebRTCSpatialConnection() void LLVoiceWebRTCSpatialConnection::setMuteMic(bool muted) { - if (mMuted != muted) + mMuted = muted; + if (mWebRTCAudioInterface) { - mMuted = muted; - if (mWebRTCAudioInterface) + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp && mRegionID == regionp->getRegionID()) { - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp && mRegionID == regionp->getRegionID()) - { - mWebRTCAudioInterface->setMute(muted); - } - else - { - // Always mute this agent with respect to neighboring regions. - // Peers don't want to hear this agent from multiple regions - // as that'll echo. - mWebRTCAudioInterface->setMute(true); - } + mWebRTCAudioInterface->setMute(muted); + } + else + { + // Always mute this agent with respect to neighboring regions. + // Peers don't want to hear this agent from multiple regions + // as that'll echo. + mWebRTCAudioInterface->setMute(true); } } } |