diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2018-03-09 17:26:41 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2018-03-09 17:26:41 +0200 |
commit | 0f4ff672bdb8623d9d1348c846f1321a4a111823 (patch) | |
tree | 3160a54ce03d87ff42ef97955f01b4feb7abf0f4 /indra/newview/llfloaterreporter.cpp | |
parent | 69d87dfb630032707ca1a14b8aa7e54218477ead (diff) |
MAINT-8366 FIXED "Report Abuse" preview screenshot all black
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rw-r--r-- | indra/newview/llfloaterreporter.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 3a3660bb31..a320bcc6fc 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -162,9 +162,9 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) mPosition(), mCopyrightWarningSeen( FALSE ), mResourceDatap(new LLResourceData()), - mAvatarNameCacheConnection(), - mSnapshotTimer() + mAvatarNameCacheConnection() { + gIdleCallbacks.addFunction(onIdle, this); } // virtual @@ -225,6 +225,7 @@ LLFloaterReporter::~LLFloaterReporter() { mAvatarNameCacheConnection.disconnect(); } + gIdleCallbacks.deleteFunction(onIdle, this); // child views automatically deleted mObjectID = LLUUID::null; @@ -242,15 +243,17 @@ LLFloaterReporter::~LLFloaterReporter() delete mResourceDatap; } -// virtual -void LLFloaterReporter::draw() +void LLFloaterReporter::onIdle(void* user_data) { - LLFloater::draw(); - static LLCachedControl<F32> screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); - if (mSnapshotTimer.getStarted() && mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + LLFloaterReporter* floater_reporter = (LLFloaterReporter*)user_data; + if (floater_reporter) { - mSnapshotTimer.stop(); - takeNewSnapshot(); + static LLCachedControl<F32> screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay"); + if (floater_reporter->mSnapshotTimer.getStarted() && floater_reporter->mSnapshotTimer.getElapsedTimeF32() > screenshot_delay) + { + floater_reporter->mSnapshotTimer.stop(); + floater_reporter->takeNewSnapshot(); + } } } |