diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-10-23 18:30:09 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-10-23 18:30:09 +0300 |
commit | 5082b42d0a41d4566bf23e17af0483c747166c10 (patch) | |
tree | 436108424299c39ef0c9ad32c8c2fa778af0b947 /indra/newview/llfloatermyscripts.cpp | |
parent | c7e9bbc20e2c08976cdb72a877d7d41a2546f418 (diff) | |
parent | 33821bd599d1d9171cc93c38a2bc6c4ab6772c9a (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llfloatermyscripts.cpp')
-rw-r--r-- | indra/newview/llfloatermyscripts.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp index fa2de21a8f..6f9a6c9066 100644 --- a/indra/newview/llfloatermyscripts.cpp +++ b/indra/newview/llfloatermyscripts.cpp @@ -41,6 +41,7 @@ const S32 SIZE_OF_ONE_KB = 1024; LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed) : LLFloater(seed), mGotAttachmentMemoryUsed(false), + mAttachmentDetailsRequested(false), mAttachmentMemoryMax(0), mAttachmentMemoryUsed(0), mGotAttachmentURLsUsed(false), @@ -55,12 +56,24 @@ BOOL LLFloaterMyScripts::postBuild() std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_waiting)); - return requestAttachmentDetails(); + mAttachmentDetailsRequested = requestAttachmentDetails(); + return TRUE; } -BOOL LLFloaterMyScripts::requestAttachmentDetails() +// virtual +void LLFloaterMyScripts::onOpen(const LLSD& key) { - if (!gAgent.getRegion()) return FALSE; + if (!mAttachmentDetailsRequested) + { + mAttachmentDetailsRequested = requestAttachmentDetails(); + } + + LLFloater::onOpen(key); +} + +bool LLFloaterMyScripts::requestAttachmentDetails() +{ + if (!gAgent.getRegion()) return false; LLSD body; std::string url = gAgent.getRegion()->getCapability("AttachmentResources"); @@ -68,11 +81,11 @@ BOOL LLFloaterMyScripts::requestAttachmentDetails() { LLCoros::instance().launch("LLFloaterMyScripts::getAttachmentLimitsCoro", boost::bind(&LLFloaterMyScripts::getAttachmentLimitsCoro, this, url)); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -284,7 +297,7 @@ void LLFloaterMyScripts::onClickRefresh(void* userdata) btn->setEnabled(false); } instance->clearList(); - instance->requestAttachmentDetails(); + instance->mAttachmentDetailsRequested = instance->requestAttachmentDetails(); } else { |