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 | |
parent | 69d87dfb630032707ca1a14b8aa7e54218477ead (diff) |
MAINT-8366 FIXED "Report Abuse" preview screenshot all black
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterreporter.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llfloaterreporter.h | 3 |
2 files changed, 14 insertions, 10 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(); + } } } diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index f5ba63ce7f..d9ecb9f4ea 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -83,7 +83,8 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - virtual void draw(); + + static void onIdle(void* user_data); void setReportType(EReportType type) { mReportType = type; } |