summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelwizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermodelwizard.cpp')
-rw-r--r--indra/newview/llfloatermodelwizard.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp
index ad264399d8..ae6b1dd85b 100644
--- a/indra/newview/llfloatermodelwizard.cpp
+++ b/indra/newview/llfloatermodelwizard.cpp
@@ -271,12 +271,9 @@ void LLFloaterModelWizard::onClickCalculateUploadFee()
mModelPreview->rebuildUploadData();
mUploadModelUrl.clear();
- LLMeshUploadThread* thread = new LLMeshUploadThread(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
- true, false, false, mUploadModelUrl, false);
- thread->setFeeObserverHandle(getWholeModelFeeObserverHandle());
-
- gMeshRepo.mUploadWaitList.push_back(thread);
+ gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
+ true, false, false, mUploadModelUrl, false, getWholeModelFeeObserverHandle());
}
void LLFloaterModelWizard::loadModel()
@@ -526,10 +523,12 @@ void LLFloaterModelWizard::onModelUploadSuccess()
/*virtual*/
void LLFloaterModelWizard::onModelUploadFailure()
{
- // Disable the "Upload complete" step if it has been previously enabled.
- if (mLastEnabledState > REVIEW)
+ // Failure. Make the user recalculate fees
+ setState(PHYSICS);
+ // Disable the "Review" step if it has been previously enabled.
+ if (mLastEnabledState > PHYSICS)
{
- mLastEnabledState = REVIEW;
+ mLastEnabledState = PHYSICS;
}
updateButtons();
@@ -716,12 +715,9 @@ void LLFloaterModelWizard::onUpload()
{
mModelPreview->rebuildUploadData();
- LLMeshUploadThread* thread = new LLMeshUploadThread(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
- true, false, false, mUploadModelUrl, true);
-
- thread->setUploadObserverHandle(getWholeModelUploadObserverHandle());
-
- gMeshRepo.mUploadWaitList.push_back(thread);
+ gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
+ true, false, false, mUploadModelUrl, true,
+ LLHandle<LLWholeModelFeeObserver>(), getWholeModelUploadObserverHandle());
}
void LLFloaterModelWizard::onPreviewLODCommit(LLUICtrl* ctrl)