FIRE-20838: Refreshing the Abuse Report snapshot no longer works

master
Ansariel 2017-02-04 13:28:02 +01:00
parent 0c1028c9a3
commit 65aaac2924
2 changed files with 17 additions and 8 deletions

View File

@ -850,7 +850,10 @@ void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
}
}
void LLFloaterReporter::takeNewSnapshot()
// <FS:Ansariel> Refresh screenshot button
//void LLFloaterReporter::takeNewSnapshot()
void LLFloaterReporter::takeNewSnapshot(bool refresh)
// </FS:Ansariel>
{
childSetEnabled("send_btn", true);
mImageRaw = new LLImageRaw;
@ -867,7 +870,10 @@ void LLFloaterReporter::takeNewSnapshot()
}
setVisible(TRUE);
if(gSavedPerAccountSettings.getBOOL("PreviousScreenshotForReport"))
// <FS:Ansariel> Refresh screenshot button
//if(gSavedPerAccountSettings.getBOOL("PreviousScreenshotForReport"))
if(gSavedPerAccountSettings.getBOOL("PreviousScreenshotForReport") && !refresh)
// </FS:Ansariel>
{
std::string screenshot_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_PREV_FILENAME);
mPrevImageRaw = new LLImageRaw;
@ -889,8 +895,10 @@ 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"));
// <FS:Ansariel> Refresh screenshot button
//doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this, false), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
// </FS:Ansariel>
}
void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response)
@ -968,9 +976,7 @@ void LLFloaterReporter::onClose(bool app_quitting)
// <FS:Ansariel> FIRE-15368: Don't include floater in screenshot update
void LLFloaterReporter::onUpdateScreenshot()
{
setVisible(FALSE);
takeScreenshot();
setVisible(TRUE);
doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this, true), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
}
// </FS:Ansariel>

View File

@ -107,7 +107,10 @@ public:
void onLoadScreenshotDialog(const LLSD& notification, const LLSD& response);
void takeNewSnapshot();
// <FS:Ansariel> Refresh screenshot button
//void takeNewSnapshot();
void takeNewSnapshot(bool refresh);
// </FS:Ansariel>
private:
static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null, const LLUUID& experience_id = LLUUID::null);