MAINT-8170 Crash viewer when double click on "Report Abuse"

master
Mnikolenko Productengine 2018-01-11 15:17:21 +02:00
parent 6a58024093
commit ae95759bcf
2 changed files with 11 additions and 3 deletions

View File

@ -162,7 +162,8 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
mPosition(),
mCopyrightWarningSeen( FALSE ),
mResourceDatap(new LLResourceData()),
mAvatarNameCacheConnection()
mAvatarNameCacheConnection(),
mSnapshotTimer()
{
}
@ -245,6 +246,12 @@ LLFloaterReporter::~LLFloaterReporter()
void LLFloaterReporter::draw()
{
LLFloater::draw();
static LLCachedControl<F32> screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay");
if (mSnapshotTimer.getStarted() && mSnapshotTimer.getElapsedTimeF32() > screenshot_delay)
{
mSnapshotTimer.stop();
takeNewSnapshot();
}
}
void LLFloaterReporter::enableControls(BOOL enable)
@ -877,8 +884,7 @@ void LLFloaterReporter::onOpen(const LLSD& key)
{
childSetEnabled("send_btn", false);
//Time delay to avoid UI artifacts. MAINT-7067
doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
mSnapshotTimer.start();
}
void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response)
@ -950,6 +956,7 @@ void LLFloaterReporter::setPosBox(const LLVector3d &pos)
void LLFloaterReporter::onClose(bool app_quitting)
{
mSnapshotTimer.stop();
gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", app_quitting);
}

View File

@ -149,6 +149,7 @@ private:
LLPointer<LLImageRaw> mImageRaw;
LLPointer<LLImageRaw> mPrevImageRaw;
LLFrameTimer mSnapshotTimer;
};
#endif