STORM-1105 "Traffic: 0" shown for two cases (traffic actually 0, and waiting for data)

meow-7.2.2
Jonathan Yap 2011-10-28 07:27:54 -04:00
parent 1b173ed82b
commit 8b0d63f343
5 changed files with 17 additions and 9 deletions

View File

@ -581,6 +581,7 @@ Jonathan Yap
STORM-1639
STORM-910
STORM-1642
STORM-1105
Kadah Coba
STORM-1060
Jondan Lundquist

View File

@ -433,7 +433,6 @@ BOOL LLPanelLandGeneral::postBuild()
mTextDwell = getChild<LLTextBox>("DwellText");
mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
@ -696,20 +695,26 @@ void LLPanelLandGeneral::refresh()
S32 area;
S32 claim_price;
S32 rent_price;
F32 dwell;
F32 dwell = DWELL_NAN;
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 (dwell == DWELL_NAN)
{
mTextDwell->setText(LLTrans::getString("LoadingData"));
}
else
{
mTextDwell->setText(llformat("%.0f", dwell));
}
if (for_sale)
{

View File

@ -113,7 +113,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mRequestResult(0),
mWestSouth(),
mEastNorth(),
mSelectedDwell(0.f),
mSelectedDwell(DWELL_NAN),
mAgentParcelSequenceID(-1),
mHoverRequestResult(0),
mHoverWestSouth(),
@ -233,7 +233,7 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
S32 price = 0;
S32 rent = 0;
BOOL for_sale = FALSE;
F32 dwell = 0.f;
F32 dwell = DWELL_NAN;
if (mSelected)
{
@ -579,7 +579,7 @@ void LLViewerParcelMgr::deselectLand()
mCurrentParcel->mBanList.clear();
//mCurrentParcel->mRenterList.reset();
mSelectedDwell = 0.f;
mSelectedDwell = DWELL_NAN;
// invalidate parcel selection so that existing users of this selection can clean up
mCurrentParcelSelection->setParcel(NULL);
@ -1663,7 +1663,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter();
// Request dwell for this land, if it's not public land.
LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f;
LLViewerParcelMgr::getInstance()->mSelectedDwell = DWELL_NAN;
if (0 != local_id)
{
LLViewerParcelMgr::getInstance()->sendParcelDwellRequest();

View File

@ -43,6 +43,8 @@ class LLParcel;
class LLViewerTexture;
class LLViewerRegion;
const F32 DWELL_NAN = -1.0f; // A dwell having this value will be displayed as Loading...
// Constants for sendLandOwner
//const U32 NO_NEIGHBOR_JOIN = 0x0;
//const U32 ALL_NEIGHBOR_JOIN = U32( NORTH_MASK

View File

@ -487,7 +487,7 @@
name="DwellText"
top_delta="0"
width="186">
0
Loading...
</text>
<button