summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2013-07-28 10:42:51 -0400
committerJonathan Yap <none@none>2013-07-28 10:42:51 -0400
commit22a931efad1380e6c04dce12fe5b16c21d98a908 (patch)
treec0b7ed8f74b695c841a81c3397764e704c6d9a76
parent6060e5e46acbeb20a301070a0fd0efea029d33d0 (diff)
STORM-1957 World Map - Land For Sale is missing L$ / sqm
-rwxr-xr-xdoc/contributions.txt1
-rwxr-xr-xindra/newview/llworldmap.cpp11
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml2
3 files changed, 13 insertions, 1 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 66ccb404a8..0509a9cbc8 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -649,6 +649,7 @@ Jonathan Yap
STORM-1858
STORM-1862
OPEN-161
+ STORM-1957
Kadah Coba
STORM-1060
STORM-1843
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 5fa380e0e3..bfae142812 100755
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -522,6 +522,17 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID&
tooltip_fmt.setArg("[AREA]", llformat("%d", extra));
tooltip_fmt.setArg("[PRICE]", llformat("%d", extra2));
+
+ // Check for division by zero
+ if (extra != 0)
+ {
+ tooltip_fmt.setArg("[SQMPRICE]", llformat("%.1f", (F32)extra2 / (F32)extra));
+ }
+ else
+ {
+ tooltip_fmt.setArg("[SQMPRICE]", LLTrans::getString("Unknown"));
+ }
+
new_item.setTooltip(tooltip_fmt.getString());
if (type == MAP_ITEM_LAND_FOR_SALE)
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index f7b33b0a4a..3030a1ae9f 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -378,7 +378,7 @@ Please try logging in again in a minute.</string>
<!-- world map -->
<string name="texture_loading">Loading...</string>
<string name="worldmap_offline">Offline</string>
- <string name="worldmap_item_tooltip_format">[AREA] m² L$[PRICE]</string>
+ <string name="worldmap_item_tooltip_format">[AREA] m² L$[PRICE] ([SQMPRICE] L$/m²)</string>
<string name="worldmap_results_none_found">None found.</string>
<!-- animations uploading status codes -->