diff options
-rwxr-xr-x | doc/contributions.txt | 2 | ||||
-rwxr-xr-x | indra/newview/llworldmap.cpp | 11 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/strings.xml | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 66ccb404a8..579db5fe1f 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -301,6 +301,7 @@ Ciaran Laval Cinder Roxley BUG-2326 STORM-1703 + STORM-1958 Clara Young Coaldust Numbers VWR-1095 @@ -649,6 +650,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 --> |