From 3b3b6c38a4afe3a061c54cc9fa9f8d7c65dcb990 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 7 Nov 2011 15:12:22 +0200 Subject: STORM-1580 WIP Switched profile feed snapshot format to PNG for better clarity. --- indra/newview/llpanelsnapshot.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llpanelsnapshot.cpp') diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index 35627ababe..d00089b181 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -34,6 +34,7 @@ // newview #include "llsidetraypanelcontainer.h" +#include "llviewercontrol.h" // gSavedSettings // virtual BOOL LLPanelSnapshot::postBuild() @@ -45,7 +46,19 @@ BOOL LLPanelSnapshot::postBuild() // virtual void LLPanelSnapshot::onOpen(const LLSD& key) { + S32 old_format = gSavedSettings.getS32("SnapshotFormat"); + S32 new_format = (S32) getImageFormat(); + + gSavedSettings.setS32("SnapshotFormat", new_format); setCtrlsEnabled(true); + + // Switching panels will likely change image format. + // Not updating preview right away may lead to errors, + // e.g. attempt to send a large BMP image by email. + if (old_format != new_format) + { + LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true)); + } } LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshot::getImageFormat() const -- cgit v1.2.3