diff options
| -rw-r--r-- | indra/newview/lltexturectrl.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/lltexturectrl.h | 2 | 
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 5415f9bd9a..d9001bc16a 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -538,6 +538,8 @@ void LLFloaterTexturePicker::onClose(bool app_quitting)  	}  	stopUsingPipette();      sLastPickerMode = mModeSelector->getValue().asInteger(); +    // *NOTE: Vertex buffer for sphere preview is still cached +    mGLTFPreview = nullptr;  }  // virtual @@ -1760,6 +1762,19 @@ void LLTextureCtrl::setFilterPermissionMasks(PermissionMask mask)      setDnDFilterPermMask(mask);  } +void LLTextureCtrl::onVisibilityChange(BOOL new_visibility) +{ +    if (!new_visibility) +    { +        // *NOTE: Vertex buffer for sphere preview is still cached +        mGLTFPreview = nullptr; +    } +    else +    { +        llassert(!mGLTFPreview); +    } +} +  void LLTextureCtrl::setVisible( BOOL visible )   {  	if( !visible ) diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 05ea185b1b..a19c8b6e3d 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -160,6 +160,8 @@ public:  	virtual void	setVisible( BOOL visible );  	virtual void	setEnabled( BOOL enabled ); +	void onVisibilityChange(BOOL new_visibility) override; +  	void			setValid(BOOL valid);  	// LLUICtrl interface  | 
