diff options
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 0c3730d084..2e137a8e12 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -176,6 +176,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mSelectedItemPinned( FALSE ), mCanApply(true), mCanPreview(true), + mLimitsSet(false), mMaxDim(S32_MAX), mMinDim(0), mPreviewSettingChanged(false), @@ -282,7 +283,7 @@ bool LLFloaterTexturePicker::updateImageStats() S32 height = mTexturep->getFullHeight(); if (width > 0 && height > 0) { - if (width != height + if ((mLimitsSet && (width != height)) || width < mMinDim || width > mMaxDim || height < mMinDim @@ -1200,6 +1201,7 @@ void LLFloaterTexturePicker::setCanApply(bool can_preview, bool can_apply, bool void LLFloaterTexturePicker::setMinDimentionsLimits(S32 min_dim) { mMinDim = min_dim; + mLimitsSet = true; std::string formatted_dims = llformat("%dx%d", mMinDim, mMinDim); mResolutionWarning->setTextArg("[MINTEXDIM]", formatted_dims); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 7239b97552..e2bfe286d3 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -403,6 +403,7 @@ private: bool mCanApply; bool mCanPreview; bool mPreviewSettingChanged; + bool mLimitsSet; S32 mMaxDim; S32 mMinDim; |