diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-01-19 17:28:53 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-01-19 17:28:53 +0200 |
commit | a283e9b2e155160f0766d95875d4d6b0679e47c5 (patch) | |
tree | 43a8cb2940edad1fd432912209ce9914d006c4f5 /indra/newview | |
parent | 34246f686ea896a293afe1464bab057a3bda0a4f (diff) |
MAINT-7066 Issues where viewer always asks to use previous screenshot when filing abuse report.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterreporter.cpp | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 790e2b3ad1..275554540e 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -510,50 +510,59 @@ void LLFloaterReporter::showFromMenu(EReportType report_type) LL_WARNS() << "Unknown LLViewerReporter type : " << report_type << LL_ENDL; return; } - - LLFloaterReporter* f = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter", LLSD()); - if (f) + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter", LLSD()); + if (reporter_floater) { - f->setReportType(report_type); + reporter_floater->setReportType(report_type); } } // static void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name, const LLUUID& experience_id) { - LLFloaterReporter* f = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter"); - + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter"); if (avatar_name.empty()) { // Request info for this object - f->getObjectInfo(object_id); + reporter_floater->getObjectInfo(object_id); } else { - f->setFromAvatarID(object_id); + reporter_floater->setFromAvatarID(object_id); } if(experience_id.notNull()) { - f->getExperienceInfo(experience_id); + reporter_floater->getExperienceInfo(experience_id); } // Need to deselect on close - f->mDeselectOnClose = TRUE; - - f->openFloater(); + reporter_floater->mDeselectOnClose = TRUE; } void LLFloaterReporter::showFromExperience( const LLUUID& experience_id ) { - LLFloaterReporter* f = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter"); - f->getExperienceInfo(experience_id); + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter"); + reporter_floater->getExperienceInfo(experience_id); // Need to deselect on close - f->mDeselectOnClose = TRUE; - - f->openFloater(); + reporter_floater->mDeselectOnClose = TRUE; } |