summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-03-04 11:55:18 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-03-04 11:55:18 +0200
commit903d9d123643e0590c4ed6a162271d0736a4f167 (patch)
tree84073282dee97b0ae7f2297ddf5cd3015d4a88cc /indra
parentadc48a7effd3394dd5c17ccb63f4589f5b94f7f2 (diff)
MAINT-1961 FIXED Use "TextureLivePreview" setting by default, if mCanPreview was not set manually.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/lltexturectrl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 374c18b30d..7667b3b5a2 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -194,6 +194,7 @@ protected:
private:
bool mCanApply;
bool mCanPreview;
+ bool mPreviewSettingChanged;
texture_selected_callback mTextureSelectedCallback;
};
@@ -221,7 +222,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mContextConeOpacity(0.f),
mSelectedItemPinned( FALSE ),
mCanApply(true),
- mCanPreview(true)
+ mCanPreview(true),
+ mPreviewSettingChanged(false)
{
buildFromFile("floater_texture_ctrl.xml");
mCanApplyImmediately = can_apply_immediately;
@@ -829,6 +831,16 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
}
setImageID(itemp->getAssetUUID(),false);
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
+
+ if(!mPreviewSettingChanged)
+ {
+ mCanPreview = gSavedSettings.getBOOL("TextureLivePreview");
+ }
+ else
+ {
+ mPreviewSettingChanged = false;
+ }
+
if (user_action && mCanPreview)
{
// only commit intentional selections, not implicit ones
@@ -985,6 +997,7 @@ void LLFloaterTexturePicker::setCanApply(bool can_preview, bool can_apply)
mCanApply = can_apply;
mCanPreview = can_preview ? gSavedSettings.getBOOL("TextureLivePreview") : false;
+ mPreviewSettingChanged = true;
}
void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )