diff options
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rwxr-xr-x | indra/newview/lltexturectrl.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 717807f513..980810835e 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -188,6 +188,7 @@ protected: private: bool mCanApply; bool mCanPreview; + bool mPreviewSettingChanged; texture_selected_callback mTextureSelectedCallback; }; @@ -215,7 +216,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; @@ -823,6 +825,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 @@ -979,6 +991,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 ) |