From b267515922f6bca9034810ab7f18626f39cec356 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Jul 2023 22:06:23 +0300 Subject: [PATCH 1/2] SL-20068 Selecting from texture picker for thumbnail does not assign thumbnail --- indra/newview/lltexturectrl.cpp | 8 ++++---- indra/newview/lltexturectrl.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 36fa4e9a37..29891ba235 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -715,11 +715,11 @@ void LLFloaterTexturePicker::commitIfImmediateSet() { if (!mNoCopyTextureSelected && mCanApply) { - commitCallback(); + commitCallback(LLTextureCtrl::TEXTURE_CHANGE); } } -void LLFloaterTexturePicker::commitCallback() +void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op) { if (!mOnFloaterCommitCallback) { @@ -776,7 +776,7 @@ void LLFloaterTexturePicker::commitCallback() break; } - mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_CHANGE, mode, asset_id, inventory_id); + mOnFloaterCommitCallback(op, mode, asset_id, inventory_id); } void LLFloaterTexturePicker::commitCancel() { @@ -845,7 +845,7 @@ void LLFloaterTexturePicker::onBtnCancel(void* userdata) void LLFloaterTexturePicker::onBtnSelect(void* userdata) { LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; - self->commitCallback(); + self->commitCallback(LLTextureCtrl::TEXTURE_SELECT); self->closeFloater(); } diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 3cf8861075..60543191b6 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -317,7 +317,7 @@ public: void updateFilterPermMask(); void commitIfImmediateSet(); - void commitCallback(); + void commitCallback(LLTextureCtrl::ETexturePickOp op); void commitCancel(); void onFilterEdit(const std::string& search_string); From 1cf4a2c95210ba94c330710e0a98f762bf54c605 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 27 Jul 2023 13:30:09 +0300 Subject: [PATCH 2/2] SL-20080 Show warning message when selecting a non square texture for thumbnails --- indra/newview/lltexturectrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 29891ba235..a746744e53 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -282,7 +282,8 @@ bool LLFloaterTexturePicker::updateImageStats() S32 height = mTexturep->getFullHeight(); if (width > 0 && height > 0) { - if (width < mMinDim + if (width != height + || width < mMinDim || width > mMaxDim || height < mMinDim || height > mMaxDim