summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimagepreview.cpp')
-rw-r--r--indra/newview/llfloaterimagepreview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 696f748613..028c922a4d 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -35,6 +35,7 @@
#include "llagent.h"
#include "llbutton.h"
+#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "lldrawable.h"
#include "lldrawpoolavatar.h"
@@ -115,8 +116,14 @@ BOOL LLFloaterImagePreview::postBuild()
mSculptedPreview = new LLImagePreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
- if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
- getChildView("lossless_check")->setEnabled(TRUE);
+ if (mRawImagep->getWidth() * mRawImagep->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
+ {
+ // We want "lossless_check" to be unchecked when it is disabled, regardless of
+ // LosslessJ2CUpload state, so only assign control when enabling checkbox
+ LLCheckBoxCtrl* check_box = getChild<LLCheckBoxCtrl>("lossless_check");
+ check_box->setEnabled(TRUE);
+ check_box->setControlVariable(gSavedSettings.getControl("LosslessJ2CUpload"));
+ }
}
else
{