summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r--indra/newview/llfloaterland.cpp50
1 files changed, 29 insertions, 21 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index f4a515e0a0..a92634bc31 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -604,6 +604,25 @@ void LLPanelLandGeneral::refresh()
mBtnSellLand->setVisible(FALSE);
mBtnStopSellLand->setVisible(FALSE);
+ // show pricing information
+ S32 area;
+ S32 claim_price;
+ S32 rent_price;
+ F32 dwell;
+ LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
+ &claim_price,
+ &rent_price,
+ &for_sale,
+ &dwell);
+
+ // Area
+ LLUIString price = childGetText("area_size_text");
+ price.setArg("[AREA]", llformat("%d",area));
+ mTextPriceLabel->setText(childGetText("area_text"));
+ mTextPrice->setText(price.getString());
+
+ mTextDwell->setText(llformat("%.0f", dwell));
+
if (for_sale)
{
mSaleInfoForSale1->setVisible(TRUE);
@@ -619,7 +638,15 @@ void LLPanelLandGeneral::refresh()
mSaleInfoForSaleNoObjects->setVisible(TRUE);
}
mSaleInfoNotForSale->setVisible(FALSE);
+
+ F32 cost_per_sqm = 0.0f;
+ if (area > 0)
+ {
+ cost_per_sqm = (F32)parcel->getSalePrice() / (F32)area;
+ }
+
mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice()));
+ mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm));
if (can_be_sold)
{
mBtnStopSellLand->setVisible(TRUE);
@@ -645,25 +672,6 @@ void LLPanelLandGeneral::refresh()
mBtnBuyGroupLand->setEnabled(
LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true));
- // show pricing information
- S32 area;
- S32 claim_price;
- S32 rent_price;
- F32 dwell;
- LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
- &claim_price,
- &rent_price,
- &for_sale,
- &dwell);
-
- // Area
- LLUIString price = getString("area_size_text");
- price.setArg("[AREA]", llformat("%d",area));
- mTextPriceLabel->setText(getString("area_text"));
- mTextPrice->setText(price.getString());
-
- mTextDwell->setText(llformat("%.0f", dwell));
-
if(region_owner)
{
mBtnReclaimLand->setEnabled(
@@ -1716,8 +1724,6 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
BOOL LLPanelLandOptions::postBuild()
{
-
-
mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check");
childSetCommitCallback("edit objects check", onCommitAny, this);
@@ -1829,6 +1835,8 @@ BOOL LLPanelLandOptions::postBuild()
mLandingTypeCombo = getChild<LLComboBox>( "landing type");
childSetCommitCallback("landing type", onCommitAny, this);
+ getChild<LLTextureCtrl>("snapshot_ctrl")->setFallbackImageName("default_land_picture.j2c");
+
return TRUE;
}