diff options
author | Jacek Antonelli | 2008-08-15 23:45:29 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:29 -0500 |
commit | 7bdb4845afdd157f95281293803567090e3f992a (patch) | |
tree | fbcada1c227d7407f9f37ccba360bfe6326d9c5e /linden/indra/newview/llfloaterworldmap.cpp | |
parent | Second Life viewer sources 1.19.0.0 (diff) | |
download | meta-impy-7bdb4845afdd157f95281293803567090e3f992a.zip meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.gz meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.bz2 meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.xz |
Second Life viewer sources 1.19.0.2
Diffstat (limited to 'linden/indra/newview/llfloaterworldmap.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterworldmap.cpp | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index ee84537..7a8940d 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp | |||
@@ -852,15 +852,17 @@ void LLFloaterWorldMap::friendsChanged() | |||
852 | void LLFloaterWorldMap::buildAvatarIDList() | 852 | void LLFloaterWorldMap::buildAvatarIDList() |
853 | { | 853 | { |
854 | LLCtrlListInterface *list = childGetListInterface("friend combo"); | 854 | LLCtrlListInterface *list = childGetListInterface("friend combo"); |
855 | if (!list) return; | 855 | if (!list) |
856 | 856 | { | |
857 | return; | ||
858 | } | ||
859 | |||
857 | // Delete all but the "None" entry | 860 | // Delete all but the "None" entry |
858 | S32 list_size = list->getItemCount(); | 861 | S32 list_size = list->getItemCount(); |
859 | while (list_size > 1) | 862 | if (list_size > 1) |
860 | { | 863 | { |
861 | list->selectNthItem(1); | 864 | list->selectItemRange(1, -1); |
862 | list->operateOnSelection(LLCtrlListInterface::OP_DELETE); | 865 | list->operateOnSelection(LLCtrlListInterface::OP_DELETE); |
863 | --list_size; | ||
864 | } | 866 | } |
865 | 867 | ||
866 | LLSD default_column; | 868 | LLSD default_column; |
@@ -872,11 +874,9 @@ void LLFloaterWorldMap::buildAvatarIDList() | |||
872 | // Get all of the calling cards for avatar that are currently online | 874 | // Get all of the calling cards for avatar that are currently online |
873 | LLCollectMappableBuddies collector; | 875 | LLCollectMappableBuddies collector; |
874 | LLAvatarTracker::instance().applyFunctor(collector); | 876 | LLAvatarTracker::instance().applyFunctor(collector); |
875 | LLCollectMappableBuddies::buddy_map_t::iterator it; | 877 | |
876 | LLCollectMappableBuddies::buddy_map_t::iterator end; | 878 | for (LLCollectMappableBuddies::buddy_map_t::iterator it = collector.mMappable.begin(); |
877 | it = collector.mMappable.begin(); | 879 | it != collector.mMappable.end(); ++it) |
878 | end = collector.mMappable.end(); | ||
879 | for( ; it != end; ++it) | ||
880 | { | 880 | { |
881 | list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second); | 881 | list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second); |
882 | } | 882 | } |
@@ -889,15 +889,17 @@ void LLFloaterWorldMap::buildAvatarIDList() | |||
889 | void LLFloaterWorldMap::buildLandmarkIDLists() | 889 | void LLFloaterWorldMap::buildLandmarkIDLists() |
890 | { | 890 | { |
891 | LLCtrlListInterface *list = childGetListInterface("landmark combo"); | 891 | LLCtrlListInterface *list = childGetListInterface("landmark combo"); |
892 | if (!list) return; | 892 | if (!list) |
893 | { | ||
894 | return; | ||
895 | } | ||
893 | 896 | ||
894 | // Delete all but the "None" entry | 897 | // Delete all but the "None" entry |
895 | S32 list_size = list->getItemCount(); | 898 | S32 list_size = list->getItemCount(); |
896 | while (list_size > 1) | 899 | if (list_size > 1) |
897 | { | 900 | { |
898 | list->selectNthItem(1); | 901 | list->selectItemRange(1, -1); |
899 | list->operateOnSelection(LLCtrlListInterface::OP_DELETE); | 902 | list->operateOnSelection(LLCtrlListInterface::OP_DELETE); |
900 | --list_size; | ||
901 | } | 903 | } |
902 | 904 | ||
903 | mLandmarkItemIDList.reset(); | 905 | mLandmarkItemIDList.reset(); |
@@ -918,6 +920,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists() | |||
918 | items, | 920 | items, |
919 | LLInventoryModel::EXCLUDE_TRASH, | 921 | LLInventoryModel::EXCLUDE_TRASH, |
920 | is_landmark); | 922 | is_landmark); |
923 | |||
921 | std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers()); | 924 | std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers()); |
922 | 925 | ||
923 | S32 count = items.count(); | 926 | S32 count = items.count(); |
@@ -930,7 +933,9 @@ void LLFloaterWorldMap::buildLandmarkIDLists() | |||
930 | mLandmarkAssetIDList.put( item->getAssetUUID() ); | 933 | mLandmarkAssetIDList.put( item->getAssetUUID() ); |
931 | mLandmarkItemIDList.put( item->getUUID() ); | 934 | mLandmarkItemIDList.put( item->getUUID() ); |
932 | } | 935 | } |
936 | |||
933 | list->sortByColumn("landmark name", TRUE); | 937 | list->sortByColumn("landmark name", TRUE); |
938 | |||
934 | list->selectFirstItem(); | 939 | list->selectFirstItem(); |
935 | } | 940 | } |
936 | 941 | ||