summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r--indra/newview/llfloaterworldmap.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 365926863e..996e90ed8e 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -1222,6 +1222,14 @@ void LLFloaterWorldMap::onLocationCommit( void* userdata )
LLString str = self->childGetValue("location").asString();
+ // Trim any leading and trailing spaces in the search target
+ LLString saved_str = str;
+ LLString::trim( str );
+ if ( str != saved_str )
+ { // Set the value in the UI if any spaces were removed
+ self->childSetValue("location", str);
+ }
+
LLString::toLower(str);
gFloaterWorldMap->mCompletingRegionName = str;
gWorldMap->mIsTrackingCommit = TRUE;