summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshot.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-11-07 15:12:22 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-11-07 15:12:22 +0200
commit3b3b6c38a4afe3a061c54cc9fa9f8d7c65dcb990 (patch)
tree68f9d08dd915aaa7278bfe67f3fbd9ddba5d6155 /indra/newview/llpanelsnapshot.cpp
parente1190cb1158b14bcc62b8ec3e771ee7694b9f7c0 (diff)
STORM-1580 WIP Switched profile feed snapshot format to PNG for better clarity.
Diffstat (limited to 'indra/newview/llpanelsnapshot.cpp')
-rw-r--r--indra/newview/llpanelsnapshot.cpp13
1 files changed, 13 insertions, 0 deletions
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