summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-18 21:08:34 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-18 21:08:55 +0200
commit9df7f5728b7dd33f3acca15ea6eceb99128b5f1f (patch)
tree1c9bee8b77fed168680ec2f60497f7542c5a14f4 /indra/newview
parenta7b174967270f34a6a1f576b68a9f92ad1112cfa (diff)
SL-12870 Misleading UI value
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterimagepreview.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/floater_image_preview.xml2
2 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index d4b0fa85ab..1728d81bbc 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
{
diff --git a/indra/newview/skins/default/xui/en/floater_image_preview.xml b/indra/newview/skins/default/xui/en/floater_image_preview.xml
index 44d2c14cc8..f8cc508e81 100644
--- a/indra/newview/skins/default/xui/en/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_image_preview.xml
@@ -120,8 +120,8 @@
Try saving image as 24 bit Targa (.tga).
</text>
<check_box
- control_name="LosslessJ2CUpload"
enabled="false"
+ initial_value="false"
follows="bottom|left"
height="16"
label="Use lossless compression"