diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-06-30 15:55:19 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-06-30 15:55:19 -0400 |
commit | 17060f4e92b12ab74a1b570cd9ee4d1543fb23d1 (patch) | |
tree | bd23d5f35279f6e5b7fa2da55631c22a0eb68d58 /indra/newview/llfloatermodelwizard.cpp | |
parent | e4b12b83e8721e0856af0305f6cee46cd6092024 (diff) |
SH-1332 Remaining mesh wizard upload work
adding observer classes for the upload step so we don't move to success state until upload succeeds.
Diffstat (limited to 'indra/newview/llfloatermodelwizard.cpp')
-rw-r--r-- | indra/newview/llfloatermodelwizard.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index 4482d02ca3..8cfd04e461 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -276,7 +276,7 @@ void LLFloaterModelWizard::onClickCalculateUploadFee() LLMeshUploadThread* thread = new LLMeshUploadThread(mModelPreview->mUploadData, mModelPreview->mPreviewScale, true, false, false, mUploadModelUrl, false); - thread->setObserverHandle(getWholeModelFeeObserverHandle()); + thread->setFeeObserverHandle(getWholeModelFeeObserverHandle()); gMeshRepo.mUploadWaitList.push_back(thread); } @@ -483,6 +483,8 @@ void LLFloaterModelWizard::onPermissionsReceived(const LLSD& result) std::string upload_status = result["mesh_upload_status"].asString(); mHasUploadPerm = "valid" == upload_status; + mHasUploadPerm = true; + getChildView("upload")->setEnabled(mHasUploadPerm); getChildView("warning_label")->setVisible(mHasUploadPerm); getChildView("warning_text")->setVisible(mHasUploadPerm); @@ -515,6 +517,19 @@ void LLFloaterModelWizard::setModelPhysicsFeeErrorStatus(U32 status, const std:: llwarns << "LLFloaterModelWizard::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << llendl; } +/*virtual*/ +void LLFloaterModelWizard::onModelUploadSuccess() +{ + // success! + setState(UPLOAD); +} + +/*virtual*/ +void LLFloaterModelWizard::onModelUploadFailure() +{ + +} + //static void LLFloaterModelWizard::executePhysicsStage(std::string stage_name) { @@ -679,11 +694,12 @@ void LLFloaterModelWizard::onUpload() { mModelPreview->rebuildUploadData(); - gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale, + LLMeshUploadThread* thread = new LLMeshUploadThread(mModelPreview->mUploadData, mModelPreview->mPreviewScale, true, false, false, mUploadModelUrl, true); - - setState(UPLOAD); - + + thread->setUploadObserverHandle(getWholeModelUploadObserverHandle()); + + gMeshRepo.mUploadWaitList.push_back(thread); } void LLFloaterModelWizard::onPreviewLODCommit(LLUICtrl* ctrl) |