meow-7.2.2
Dave Parks 2011-07-12 13:22:38 -05:00
commit 8a28549694
4 changed files with 29 additions and 16 deletions

View File

@ -5482,7 +5482,17 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
void LLFloaterModelPreview::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)
{
mUploadModelUrl = upload_url;
mModelPhysicsFee = result;
mModelPhysicsFee["url"] = upload_url;
doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::handleModelPhysicsFeeReceived,this));
}
void LLFloaterModelPreview::handleModelPhysicsFeeReceived()
{
const LLSD& result = mModelPhysicsFee;
mUploadModelUrl = result["url"].asString();
childSetTextArg("weights", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal()));
childSetTextArg("weights", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal()));
childSetTextArg("weights", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal()));

View File

@ -201,7 +201,7 @@ public:
/*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason);
/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
void handleModelPhysicsFeeReceived();
/*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason);
/*virtual*/ void onModelUploadSuccess();
@ -273,6 +273,8 @@ protected:
LLToggleableMenu* mViewOptionMenu;
LLMutex* mStatusLock;
LLSD mModelPhysicsFee;
private:
void onClickCalculateBtn();
void toggleCalculateButton();

View File

@ -34,6 +34,7 @@
#include "llagent.h"
#include "llappviewer.h"
#include "llbufferstream.h"
#include "llcallbacklist.h"
#include "llcurl.h"
#include "lldatapacker.h"
#include "llfloatermodelpreview.h"
@ -355,7 +356,6 @@ public:
cc = llsd_from_file("fake_upload_error.xml");
}
llinfos << "completed" << llendl;
mThread->mPendingUploads--;
dump_llsd_to_file(cc,make_dump_name("whole_model_fee_response_",dump_num));
@ -364,7 +364,6 @@ public:
if (isGoodStatus(status) &&
cc["state"].asString() == "upload")
{
llinfos << "fee request succeeded" << llendl;
mThread->mWholeModelUploadURL = cc["uploader"].asString();
if (observer)
@ -414,8 +413,7 @@ public:
//assert_main_thread();
mThread->mPendingUploads--;
dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num));
llinfos << "LLWholeModelUploadResponder content: " << cc << llendl;
LLWholeModelUploadObserver* observer = mObserverHandle.get();
// requested "mesh" asset type isn't actually the type
@ -423,13 +421,12 @@ public:
if (isGoodStatus(status) &&
cc["state"].asString() == "complete")
{
llinfos << "upload succeeded" << llendl;
mModelData["asset_type"] = "object";
gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mModelData,cc));
if (observer)
{
observer->onModelUploadSuccess();
doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadSuccess, observer));
}
}
else
@ -440,7 +437,7 @@ public:
if (observer)
{
observer->onModelUploadFailure();
doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadFailure, observer));
}
}
}

View File

@ -1071,10 +1071,12 @@ void LLViewerObjectList::fetchObjectCosts()
LLSD id_list;
U32 object_index = 0;
U32 count = 0;
for (
std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
iter != mStaleObjectCost.end();
++iter)
)
{
// Check to see if a request for this object
// has already been made.
@ -1084,13 +1086,15 @@ void LLViewerObjectList::fetchObjectCosts()
mPendingObjectCost.insert(*iter);
id_list[object_index++] = *iter;
}
mStaleObjectCost.erase(iter++);
if (count++ >= 450)
{
break;
}
}
// id_list should now contain all
// requests in mStaleObjectCost before, so clear
// it now
mStaleObjectCost.clear();
if ( id_list.size() > 0 )
{
LLSD post_data = LLSD::emptyMap();