summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshot.cpp
diff options
context:
space:
mode:
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