From 3c12c7ce5695a1010646cdd01f5484c6c61b50f7 Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Wed, 23 May 2018 11:58:42 +0300
Subject: MAINT-8619 Disable local textures for selection in Group profile

---
 indra/newview/llpanelgroupgeneral.cpp | 1 +
 indra/newview/lltexturectrl.cpp       | 7 +++++++
 indra/newview/lltexturectrl.h         | 4 ++++
 3 files changed, 12 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index d17f5494a0..f85a2ffbc1 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -194,6 +194,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
 	if (mInsignia)
 	{
 		mInsignia->setCommitCallback(onCommitAny, this);
+		mInsignia->setAllowLocalTexture(FALSE);
 	}
 	mFounderName = getChild<LLTextBox>("founder_name");
 
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index c7adaa908f..a5a2eec246 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -990,6 +990,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
 	mOnSelectCallback(NULL),
 	mBorderColor( p.border_color() ),
 	mAllowNoTexture( FALSE ),
+	mAllowLocalTexture( TRUE ),
 	mImmediateFilterPermMask( PERM_NONE ),
 	mNonImmediateFilterPermMask( PERM_NONE ),
 	mCanApplyImmediately( FALSE ),
@@ -1198,6 +1199,12 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
 		floaterp->openFloater();
 	}
 
+	LLFloaterTexturePicker* picker_floater = dynamic_cast<LLFloaterTexturePicker*>(floaterp);
+	if (picker_floater)
+	{
+		picker_floater->setLocalTextureEnabled(mAllowLocalTexture);
+	}
+
 	if (take_focus)
 	{
 		floaterp->setFocus(TRUE);
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 840feddfaf..6bcf9c3a75 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -142,6 +142,9 @@ public:
 	void			setAllowNoTexture( BOOL b )					{ mAllowNoTexture = b; }
 	bool			getAllowNoTexture() const					{ return mAllowNoTexture; }
 
+	void			setAllowLocalTexture(BOOL b)					{ mAllowLocalTexture = b; }
+	BOOL			getAllowLocalTexture() const					{ return mAllowLocalTexture; }
+
 	const LLUUID&	getImageItemID() { return mImageItemID; }
 
 	virtual void	setImageAssetName(const std::string& name);
@@ -222,6 +225,7 @@ private:
 	LLTextBox*				 	mCaption;
 	std::string				 	mLabel;
 	BOOL					 	mAllowNoTexture; // If true, the user can select "none" as an option
+	BOOL						mAllowLocalTexture;
 	PermissionMask			 	mImmediateFilterPermMask;
 	PermissionMask				mDnDFilterPermMask;
 	PermissionMask			 	mNonImmediateFilterPermMask;
-- 
cgit v1.2.3