diff -r a8f868007986 -r 405bfc9face3 doc/contributions.txt --- a/doc/contributions.txt Tue Mar 29 19:32:41 2011 -0400 +++ b/doc/contributions.txt Sat Apr 16 16:49:47 2011 -0400 @@ -414,6 +414,7 @@ STORM-1020 STORM-1064 STORM-1077 + STORM-1128 Kage Pixel VWR-11 Ken March @@ -644,6 +645,7 @@ STORM-422 STORM-960 STORM-1019 + STORM-1128 VWR-2488 VWR-9557 VWR-10579 diff -r a8f868007986 -r 405bfc9face3 indra/newview/llfloaterworldmap.cpp --- a/indra/newview/llfloaterworldmap.cpp Tue Mar 29 19:32:41 2011 -0400 +++ b/indra/newview/llfloaterworldmap.cpp Sat Apr 16 16:49:47 2011 -0400 @@ -73,6 +73,7 @@ #include "llslider.h" #include "message.h" #include "llwindow.h" // copyTextToClipboard() +#include //--------------------------------------------------------------------------- // Constants @@ -85,6 +86,16 @@ // Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window. static const S32 MAX_VISIBLE_REGIONS = 512; +// It would be more logical to have this inside the method where it is used but to compile under gcc this +// struct has to be here. +struct SortRegionNames +{ + inline bool operator ()(std::pair const& _left, std::pair const& _right) + { + return(LLStringUtil::compareInsensitive(_left.second->getName(),_right.second->getName()) < 0); + } +}; + enum EPanDirection { PAN_UP, @@ -1483,10 +1494,13 @@ S32 name_length = mCompletingRegionName.length(); LLSD match; - + S32 num_results = 0; - std::map::const_iterator it; - for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) + + std::vector > sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); + std::sort(sim_info_vec.begin(), sim_info_vec.end(), SortRegionNames()); + + for (std::vector >::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName();