diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index e0c439ad60..f11559739a 100755 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -80,10 +80,6 @@ BOOL LLPanelBlockedList::postBuild() { mBlockedList = getChild("blocked"); mBlockedList->setCommitOnSelectionChange(TRUE); - // Performance tweak - mBlockedList->setCommitCallback(boost::bind(&LLPanelBlockedList::onSelectionChanged, this)); - // Blocklist multi selection - mBlockedList->setAllowMultipleSelection(true); this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this)); switch (gSavedSettings.getU32("BlockPeopleSortOrder")) @@ -110,16 +106,12 @@ BOOL LLPanelBlockedList::postBuild() getChild("unblock_btn")->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this)); getChild("blocked_filter_input")->setCommitCallback(boost::bind(&LLPanelBlockedList::onFilterEdit, this, _2)); - // Performance tweak - onSelectionChanged(); - return LLPanel::postBuild(); } void LLPanelBlockedList::draw() { - // Performance tweak - //updateButtons(); + updateButtons(); LLPanel::draw(); } @@ -133,8 +125,6 @@ void LLPanelBlockedList::onOpen(const LLSD& key) void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id) { - // Clear selection first before selecting new - mBlockedList->resetSelection(); mBlockedList->selectItemByUUID(mute_id); } @@ -160,27 +150,12 @@ void LLPanelBlockedList::updateButtons() void LLPanelBlockedList::unblockItem() { - // Blocklist multi selection - //LLBlockedListItem* item = mBlockedList->getBlockedItem(); - //if (item) - //{ - // LLMute mute(item->getUUID(), item->getName()); - // LLMuteList::instance().remove(mute); - //} - - std::vector panels; - mBlockedList->getSelectedItems(panels); - for (std::vector::iterator it = panels.begin(); it != panels.end(); ++it) + LLBlockedListItem* item = mBlockedList->getBlockedItem(); + if (item) { - LLBlockedListItem* item = dynamic_cast(*it); - if (item) - { - LLMute mute(item->getUUID(), item->getName()); - LLMuteList::getInstance()->remove(mute); - } + LLMute mute(item->getUUID(), item->getName()); + LLMuteList::instance().remove(mute); } - onSelectionChanged(); - // } void LLPanelBlockedList::onCustomAction(const LLSD& userdata) @@ -255,13 +230,6 @@ void LLPanelBlockedList::onFilterEdit(const std::string& search_string) mBlockedList->setNameFilter(filter); } -// Performance tweak -void LLPanelBlockedList::onSelectionChanged() -{ - updateButtons(); -} -// - void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector names) { if (names.empty() || ids.empty()) return; diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index df58a7cf2d..d39725e4a0 100755 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -72,9 +72,6 @@ private: void blockObjectByName(); void onFilterEdit(const std::string& search_string); - // Performance tweak - void onSelectionChanged(); - // List commnads void onCustomAction(const LLSD& userdata); BOOL isActionChecked(const LLSD& userdata);