summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-09-28 22:24:12 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-09-28 22:24:12 +0300
commit32cb17e3bb86e1d3e7b945f49aa39df7868059ce (patch)
tree04c2823be5069e50ccb3363a28c4df2e48ec8cea /indra/newview/llfloaterimagepreview.cpp
parent7f2388194136fc45d204f09fe63a6bd32d7e99ff (diff)
parentbac6652cdcd2d8333df04c3ebd3a6a7b752328b3 (diff)
Merge branch 'master' into DRTVWR-513-maint
# Conflicts: # indra/newview/llgroupmgr.cpp
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
{