summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-06-29 18:39:37 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-06-29 18:39:37 -0400
commitbaaa3822c758b8dfc2672bd8cda64aa61ac54716 (patch)
tree5ccba2cc467be3b9b2c7f19fb0624723c0beda07 /indra/newview/llfloatermodelpreview.cpp
parente4b12b83e8721e0856af0305f6cee46cd6092024 (diff)
SH-1726 WIP - prevent upload until sucessful fee request
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 9b61124208..cfb413491d 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -577,6 +577,7 @@ void LLFloaterModelPreview::onClickCalculateBtn()
gMeshRepo.mUploadWaitList.push_back(thread);
toggleCalculateButton(false);
+ mUploadBtn->setEnabled(false);
}
//static
@@ -750,7 +751,7 @@ void LLFloaterModelPreview::draw()
}
}
- childSetEnabled("ok_btn", mHasUploadPerm);
+ childSetEnabled("ok_btn", mHasUploadPerm && !mUploadModelUrl.empty());
childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost));
childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size()));
@@ -5425,7 +5426,8 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
{
mCalculateBtn->setVisible(visible);
mUploadBtn->setVisible(!visible);
- mUploadBtn->setEnabled(mHasUploadPerm);
+ //mUploadBtn->setEnabled(mHasUploadPerm);
+ mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
if (visible)
{
@@ -5442,6 +5444,7 @@ void LLFloaterModelPreview::onModelPhysicsFeeReceived(F64 physics, S32 fee, std:
childSetTextArg("weights", "[PH]", llformat("%.3f", physics));
childSetTextArg("weights", "[FEE]", llformat("%d", fee));
childSetVisible("weights", true);
+ mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
}
void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason)
@@ -5498,7 +5501,8 @@ void LLFloaterModelPreview::onPermissionsReceived(const LLSD& result)
// BAP HACK: handle "" for case that MeshUploadFlag cap is broken.
mHasUploadPerm = (("" == upload_status) || ("valid" == upload_status));
- mUploadBtn->setEnabled(mHasUploadPerm);
+ //mUploadBtn->setEnabled(mHasUploadPerm);
+ mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
getChild<LLTextBox>("warning_title")->setVisible(!mHasUploadPerm);
getChild<LLTextBox>("warning_message")->setVisible(!mHasUploadPerm);
}