MAINT-8403 FIXED "Snapshot" is stuck and not responding after sending snapshot via e-mail

Wed, 21 Mar 2018 18:04:53 +0200

author
maxim_productengine<mnikolenko@productengine.com>
date
Wed, 21 Mar 2018 18:04:53 +0200
changeset 55350
544cdc3ab508
parent 55349
ae0c3ad0c31b
child 55351
f3172b01f93e

MAINT-8403 FIXED "Snapshot" is stuck and not responding after sending snapshot via e-mail

indra/newview/llfloatersnapshot.cpp file | annotate | diff | revisions
indra/newview/llfloatersnapshot.h file | annotate | diff | revisions
indra/newview/llviewerassetupload.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llfloatersnapshot.cpp	Tue Mar 20 19:09:13 2018 +0200
     1.2 +++ b/indra/newview/llfloatersnapshot.cpp	Wed Mar 21 18:04:53 2018 +0200
     1.3 @@ -54,7 +54,7 @@
     1.4  
     1.5  const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
     1.6  
     1.7 -const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
     1.8 +const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit
     1.9  const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
    1.10  
    1.11  static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
    1.12 @@ -1232,6 +1232,11 @@
    1.13  	return 0;
    1.14  }
    1.15  
    1.16 +BOOL LLFloaterSnapshot::isWaitingState()
    1.17 +{
    1.18 +	return (impl->getStatus() == ImplBase::STATUS_WORKING);
    1.19 +}
    1.20 +
    1.21  BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
    1.22  {
    1.23  	LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook");
     2.1 --- a/indra/newview/llfloatersnapshot.h	Tue Mar 20 19:09:13 2018 +0200
     2.2 +++ b/indra/newview/llfloatersnapshot.h	Wed Mar 21 18:04:53 2018 +0200
     2.3 @@ -159,6 +159,8 @@
     2.4  	BOOL saveLocal();
     2.5  	static void setAgentEmail(const std::string& email);
     2.6  
     2.7 +	BOOL isWaitingState();
     2.8 +
     2.9  	class Impl;
    2.10  	friend class Impl;
    2.11  };
     3.1 --- a/indra/newview/llviewerassetupload.cpp	Tue Mar 20 19:09:13 2018 +0200
     3.2 +++ b/indra/newview/llviewerassetupload.cpp	Wed Mar 21 18:04:53 2018 +0200
     3.3 @@ -39,6 +39,7 @@
     3.4  #include "lleconomy.h"
     3.5  #include "llagent.h"
     3.6  #include "llfloaterreg.h"
     3.7 +#include "llfloatersnapshot.h"
     3.8  #include "llstatusbar.h"
     3.9  #include "llinventorypanel.h"
    3.10  #include "llsdutil.h"
    3.11 @@ -863,10 +864,10 @@
    3.12      }
    3.13  
    3.14      // Let the Snapshot floater know we have failed uploading.
    3.15 -    LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot");
    3.16 -    if (uploadInfo->getAssetType() == LLAssetType::AT_TEXTURE && floater_snapshot && floater_snapshot->isShown())
    3.17 +    LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
    3.18 +    if (uploadInfo->getAssetType() == LLAssetType::AT_IMAGE_JPEG && floater_snapshot && floater_snapshot->isWaitingState())
    3.19      {
    3.20 -        floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "inventory")));
    3.21 +        floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "postcard")));
    3.22      }
    3.23      LLFloater* floater_outfit_snapshot = LLFloaterReg::findInstance("outfit_snapshot");
    3.24      if (uploadInfo->getAssetType() == LLAssetType::AT_TEXTURE && floater_outfit_snapshot && floater_outfit_snapshot->isShown())

mercurial