summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-01-19 17:28:53 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-01-19 17:28:53 +0200
commitb18bf7e67268ec3f818f7a89159e529fe4395369 (patch)
tree5337019ed53a445927a6365909ab26dbb1422659
parentc2787beb320fc6b1aec64c32b929eaf60aff8b51 (diff)
MAINT-7066 Issues where viewer always asks to use previous screenshot when filing abuse report.
-rw-r--r--indra/newview/llfloaterreporter.cpp43
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;
}