summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
-rw-r--r--indra/newview/llfloaterbuyland.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index b08dea248f..7aa6af2fea 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -1020,14 +1020,24 @@ void LLFloaterBuyLandUI::refreshUI()
childSetText("info_size", getString("meters_supports_object", string_args));
+ F32 cost_per_sqm = 0.0f;
+ if (mParcelActualArea > 0)
+ {
+ cost_per_sqm = (F32)mParcelPrice / (F32)mParcelActualArea;
+ }
- childSetText("info_price",
- llformat(
- "L$ %d%s",
- mParcelPrice,
- mParcelSoldWithObjects
- ? "\nsold with objects"
- : ""));
+ LLStringUtil::format_map_t info_price_args;
+ info_price_args["[PRICE]"] = llformat("%d", mParcelPrice);
+ info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm);
+ if (mParcelSoldWithObjects)
+ {
+ info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects");
+ }
+ else
+ {
+ info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_without_objects");
+ }
+ childSetText("info_price", getString("info_price_string", info_price_args));
childSetVisible("info_price", mParcelIsForSale);
}
else