diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-02-19 12:23:24 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-02-19 12:23:24 +0200 |
commit | 426feae8048167c3bc08314d164265586c0ccaac (patch) | |
tree | 79359ef0c75463719d4d77cd063bd77e850e1c90 /indra/newview/llpanelsnapshotlocal.cpp | |
parent | 15c613cbc2ba52efa2783e9cf599b7b843c6d383 (diff) |
MAINT-4891 FIXED Restore chosen format when opening Local snapshot panel.
Diffstat (limited to 'indra/newview/llpanelsnapshotlocal.cpp')
-rwxr-xr-x | indra/newview/llpanelsnapshotlocal.cpp | 8 |
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)); } |