summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:41:56 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:41:56 +0300
commit3175525950ecf568eb75a6cb4f9283ee32dcd9a5 (patch)
treee7e28987b5618ffcf081a3ef0bdbb9717ccd1d6c /indra/newview/lltexturectrl.cpp
parent9d2cb130e35fcbab98d5e7cb4d0d26ca6a16503b (diff)
parent34322f8f37380df868703051230f2a4109602b3f (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index a5a2eec246..1396a8546d 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -131,7 +131,7 @@ LLFloaterTexturePicker::~LLFloaterTexturePicker()
void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selection /*=true*/)
{
- if( mImageAssetID != image_id && mActive)
+ if( ((mImageAssetID != image_id) || mTentative) && mActive)
{
mNoCopyTextureSelected = FALSE;
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
@@ -1096,6 +1096,10 @@ void LLTextureCtrl::setVisible( BOOL visible )
void LLTextureCtrl::setEnabled( BOOL enabled )
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
+ if( floaterp )
+ {
+ floaterp->setActive(enabled);
+ }
if( enabled )
{
std::string tooltip;
@@ -1110,11 +1114,6 @@ void LLTextureCtrl::setEnabled( BOOL enabled )
closeDependentFloater();
}
- if( floaterp )
- {
- floaterp->setActive(enabled);
- }
-
mCaption->setEnabled( enabled );
LLView::setEnabled( enabled );
@@ -1215,9 +1214,10 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
void LLTextureCtrl::closeDependentFloater()
{
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
- if( floaterp )
+ if( floaterp && floaterp->isInVisibleChain())
{
floaterp->setOwner(NULL);
+ floaterp->setVisible(FALSE);
floaterp->closeFloater();
}
}