Fix for SH-2028. Also fixed layout issues with new upload warning and upload price text when floater is resized.
parent
e63dd834ab
commit
7029c8ff53
|
|
@ -5486,18 +5486,23 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
|
|||
{
|
||||
std::string tbd = getString("tbd");
|
||||
childSetTextArg("weights", "[EQ]", tbd);
|
||||
childSetTextArg("weights", "[ST]", tbd);
|
||||
childSetTextArg("weights", "[SIM]", tbd);
|
||||
childSetTextArg("weights", "[PH]", tbd);
|
||||
childSetTextArg("weights", "[FEE]", tbd);
|
||||
childSetTextArg("upload_fee", "[FEE]", tbd);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterModelPreview::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url)
|
||||
void LLFloaterModelPreview::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)
|
||||
{
|
||||
mUploadModelUrl = upload_url;
|
||||
childSetTextArg("weights", "[EQ]", llformat("%d", mModelPreview->mResourceCost));
|
||||
childSetTextArg("weights", "[PH]", llformat("%.3f", physics));
|
||||
childSetTextArg("weights", "[FEE]", llformat("%d", fee));
|
||||
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()));
|
||||
childSetTextArg("weights", "[PH]", llformat("%0.3f", result["physics_cost"].asReal()));
|
||||
childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger()));
|
||||
childSetVisible("weights", true);
|
||||
childSetVisible("upload_fee", true);
|
||||
mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public:
|
|||
// called when error occurs during permissions request
|
||||
/*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason);
|
||||
|
||||
/*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url);
|
||||
/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
|
||||
|
||||
/*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
virtual void onPermissionsReceived(const LLSD& result) = 0;
|
||||
|
||||
virtual void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) = 0;
|
||||
virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
|
||||
|
||||
virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ void LLFloaterModelWizard::setPermissonsErrorStatus(U32 status, const std::strin
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLFloaterModelWizard::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url)
|
||||
void LLFloaterModelWizard::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)
|
||||
{
|
||||
swap_controls(mCalculateWeightsBtn, mCalculatingWeightsBtn, true);
|
||||
|
||||
|
|
@ -498,6 +498,7 @@ void LLFloaterModelWizard::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::
|
|||
|
||||
mUploadModelUrl = upload_url;
|
||||
|
||||
S32 fee = result["upload_price"].asInteger();
|
||||
childSetTextArg("review_fee", "[FEE]", llformat("%d", fee));
|
||||
childSetTextArg("charged_fee", "[FEE]", llformat("%d", fee));
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public:
|
|||
// called when error occurs during permissions request
|
||||
/*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason);
|
||||
|
||||
/*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url);
|
||||
/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
|
||||
|
||||
/*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason);
|
||||
|
||||
|
|
|
|||
|
|
@ -369,10 +369,8 @@ public:
|
|||
|
||||
if (observer)
|
||||
{
|
||||
S32 fee = cc["upload_price"].asInteger();
|
||||
F64 phys = cc["data"]["physics_cost"].asReal();
|
||||
|
||||
observer->onModelPhysicsFeeReceived(phys, fee, mThread->mWholeModelUploadURL);
|
||||
cc["data"]["upload_price"] = cc["upload_price"];
|
||||
observer->onModelPhysicsFeeReceived(cc["data"], mThread->mWholeModelUploadURL);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
LLWholeModelFeeObserver() { mWholeModelFeeObserverHandle.bind(this); }
|
||||
virtual ~LLWholeModelFeeObserver() {}
|
||||
|
||||
virtual void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) = 0;
|
||||
virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
|
||||
virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0;
|
||||
|
||||
LLHandle<LLWholeModelFeeObserver> getWholeModelFeeObserverHandle() const { return mWholeModelFeeObserverHandle; }
|
||||
|
|
|
|||
|
|
@ -74,28 +74,50 @@
|
|||
follows="all"/>
|
||||
|
||||
<text
|
||||
follows="top|left"
|
||||
font="SansSerif"
|
||||
bottom_delta="15"
|
||||
left_delta="0"
|
||||
name="warning_title"
|
||||
text_color="Yellow"
|
||||
top_pad="10"
|
||||
visible="false">
|
||||
WARNING:
|
||||
</text>
|
||||
<text
|
||||
follows="top|left"
|
||||
text_color="White"
|
||||
height="50"
|
||||
width="290"
|
||||
top_delta="15"
|
||||
left_delta="0"
|
||||
name="warning_message"
|
||||
parse_urls="true"
|
||||
top_pad="5"
|
||||
wrap="true"
|
||||
visible="false">
|
||||
You will not be able to complete the final upload of this model to the Second Life servers. [secondlife:///app/floater/learn_more Find out how] to get enabled for mesh model uploads.
|
||||
</text>
|
||||
|
||||
<text
|
||||
height="50"
|
||||
top_delta="55"
|
||||
left_delta="0"
|
||||
name="weights"
|
||||
width="290"
|
||||
word_wrap="true"
|
||||
>
|
||||
<text
|
||||
follows="top|left"
|
||||
>Test0: [EQ]
|
||||
</text>
|
||||
<text
|
||||
>Test: [ST]
|
||||
</text>
|
||||
Streaming: [ST]
|
||||
Simulation: [SIM]
|
||||
Physics: [PH]
|
||||
Prim equivs: [EQ]
|
||||
</text>
|
||||
|
||||
|
||||
|
||||
<tab_container
|
||||
follows="right|top|bottom"
|
||||
top="15"
|
||||
|
|
@ -407,12 +429,14 @@
|
|||
|
||||
<text
|
||||
height="16"
|
||||
left="310"
|
||||
name="weights"
|
||||
left_delta="5"
|
||||
bottom_delta="30"
|
||||
name="upload_fee"
|
||||
width="300"
|
||||
follows="bottom|right"
|
||||
word_wrap="true"
|
||||
top_pad="7">
|
||||
Prim equivs: [EQ] Physics: [PH] Upload fee: [FEE] L$
|
||||
>
|
||||
Upload fee: L$ [FEE]
|
||||
</text>
|
||||
|
||||
<button bottom="540" left="10" follows="bottom|left" height="20" label="Set to defaults"
|
||||
|
|
|
|||
Loading…
Reference in New Issue