summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotlocal.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-02-19 12:23:24 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-02-19 12:23:24 +0200
commit426feae8048167c3bc08314d164265586c0ccaac (patch)
tree79359ef0c75463719d4d77cd063bd77e850e1c90 /indra/newview/llpanelsnapshotlocal.cpp
parent15c613cbc2ba52efa2783e9cf599b7b843c6d383 (diff)
MAINT-4891 FIXED Restore chosen format when opening Local snapshot panel.
Diffstat (limited to 'indra/newview/llpanelsnapshotlocal.cpp')
-rwxr-xr-xindra/newview/llpanelsnapshotlocal.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index 43e38b95e2..01dfdc4ece 100755
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -58,6 +58,8 @@ private:
/*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
/*virtual*/ void updateControls(const LLSD& info);
+ S32 mLocalFormat;
+
void onFormatComboCommit(LLUICtrl* ctrl);
void onQualitySliderCommit(LLUICtrl* ctrl);
void onSaveFlyoutCommit(LLUICtrl* ctrl);
@@ -67,6 +69,7 @@ static LLPanelInjector<LLPanelSnapshotLocal> panel_class("llpanelsnapshotlocal")
LLPanelSnapshotLocal::LLPanelSnapshotLocal()
{
+ mLocalFormat = gSavedSettings.getS32("SnapshotFormat");
mCommitCallbackRegistrar.add("Local.Cancel", boost::bind(&LLPanelSnapshotLocal::cancel, this));
}
@@ -83,6 +86,10 @@ BOOL LLPanelSnapshotLocal::postBuild()
// virtual
void LLPanelSnapshotLocal::onOpen(const LLSD& key)
{
+ if(gSavedSettings.getS32("SnapshotFormat") != mLocalFormat)
+ {
+ getChild<LLComboBox>("local_format_combo")->selectNthItem(mLocalFormat);
+ }
LLPanelSnapshot::onOpen(key);
}
@@ -129,6 +136,7 @@ void LLPanelSnapshotLocal::updateControls(const LLSD& info)
void LLPanelSnapshotLocal::onFormatComboCommit(LLUICtrl* ctrl)
{
+ mLocalFormat = getImageFormat();
// will call updateControls()
LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true));
}