MAINT-8366 FIXED "Report Abuse" preview screenshot all black

Fri, 09 Mar 2018 17:26:41 +0200

author
maxim_productengine<mnikolenko@productengine.com>
date
Fri, 09 Mar 2018 17:26:41 +0200
changeset 55331
be6bd8f683ff
parent 55330
d28612dea27b
child 55332
eb12b1bdf847

MAINT-8366 FIXED "Report Abuse" preview screenshot all black

indra/newview/llfloaterreporter.cpp file | annotate | diff | revisions
indra/newview/llfloaterreporter.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/llfloaterreporter.cpp	Wed Mar 07 20:31:29 2018 +0200
     1.2 +++ b/indra/newview/llfloaterreporter.cpp	Fri Mar 09 17:26:41 2018 +0200
     1.3 @@ -162,9 +162,9 @@
     1.4  	mPosition(),
     1.5  	mCopyrightWarningSeen( FALSE ),
     1.6  	mResourceDatap(new LLResourceData()),
     1.7 -	mAvatarNameCacheConnection(),
     1.8 -	mSnapshotTimer()
     1.9 +	mAvatarNameCacheConnection()
    1.10  {
    1.11 +	gIdleCallbacks.addFunction(onIdle, this);
    1.12  }
    1.13  
    1.14  // virtual
    1.15 @@ -225,6 +225,7 @@
    1.16  	{
    1.17  		mAvatarNameCacheConnection.disconnect();
    1.18  	}
    1.19 +	gIdleCallbacks.deleteFunction(onIdle, this);
    1.20  
    1.21  	// child views automatically deleted
    1.22  	mObjectID 		= LLUUID::null;
    1.23 @@ -242,15 +243,17 @@
    1.24  	delete mResourceDatap;
    1.25  }
    1.26  
    1.27 -// virtual
    1.28 -void LLFloaterReporter::draw()
    1.29 +void LLFloaterReporter::onIdle(void* user_data)
    1.30  {
    1.31 -	LLFloater::draw();
    1.32 -	static LLCachedControl<F32> screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay");
    1.33 -	if (mSnapshotTimer.getStarted() && mSnapshotTimer.getElapsedTimeF32() > screenshot_delay)
    1.34 +	LLFloaterReporter* floater_reporter = (LLFloaterReporter*)user_data;
    1.35 +	if (floater_reporter)
    1.36  	{
    1.37 -		mSnapshotTimer.stop();
    1.38 -		takeNewSnapshot();
    1.39 +		static LLCachedControl<F32> screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay");
    1.40 +		if (floater_reporter->mSnapshotTimer.getStarted() && floater_reporter->mSnapshotTimer.getElapsedTimeF32() > screenshot_delay)
    1.41 +		{
    1.42 +			floater_reporter->mSnapshotTimer.stop();
    1.43 +			floater_reporter->takeNewSnapshot();
    1.44 +		}
    1.45  	}
    1.46  }
    1.47  
     2.1 --- a/indra/newview/llfloaterreporter.h	Wed Mar 07 20:31:29 2018 +0200
     2.2 +++ b/indra/newview/llfloaterreporter.h	Fri Mar 09 17:26:41 2018 +0200
     2.3 @@ -83,7 +83,8 @@
     2.4  	/*virtual*/ BOOL postBuild();
     2.5  	/*virtual*/ void onOpen(const LLSD& key);
     2.6  	/*virtual*/ void onClose(bool app_quitting);
     2.7 -	virtual void draw();
     2.8 +
     2.9 +	static void onIdle(void* user_data);
    2.10  	
    2.11  	void setReportType(EReportType type) { mReportType = type; }
    2.12  	

mercurial