From b18bf7e67268ec3f818f7a89159e529fe4395369 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 19 Jan 2017 17:28:53 +0200 Subject: MAINT-7066 Issues where viewer always asks to use previous screenshot when filing abuse report. --- indra/newview/llfloaterreporter.cpp | 43 ++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'indra/newview') 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("reporter", LLSD()); - if (f) + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance("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("reporter"); - + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance("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("reporter"); - f->getExperienceInfo(experience_id); + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance("reporter"); + reporter_floater->getExperienceInfo(experience_id); // Need to deselect on close - f->mDeselectOnClose = TRUE; - - f->openFloater(); + reporter_floater->mDeselectOnClose = TRUE; } -- cgit v1.2.3