summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2014-09-19 10:54:55 -0700
committerAura Linden <aura@lindenlab.com>2014-09-19 10:54:55 -0700
commitc25a7866408d8590b7e9672d019089cb1358dbce (patch)
tree22c361d0b9647c74813fda9cffd75617036cef17 /indra/newview/lltexturectrl.cpp
parent9ae872da5996d6c7d1f35fbf5f5c6edc75fae3c5 (diff)
parent951c83724d7e364ac52cbee2d657711fda7d2c26 (diff)
Pulled merge from viewer-tiger
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rwxr-xr-xindra/newview/lltexturectrl.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index c12753acb0..a426669b5e 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -118,7 +118,7 @@ public:
/*virtual*/ void onClose(bool app_settings);
// New functions
- void setImageID( const LLUUID& image_asset_id);
+ void setImageID( const LLUUID& image_asset_id, bool set_selection = true);
void updateImageStats();
const LLUUID& getAssetID() { return mImageAssetID; }
const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only);
@@ -232,7 +232,7 @@ LLFloaterTexturePicker::~LLFloaterTexturePicker()
{
}
-void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
+void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selection /*=true*/)
{
if( mImageAssetID != image_id && mActive)
{
@@ -253,6 +253,10 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
mNoCopyTextureSelected = TRUE;
}
+ }
+
+ if (set_selection)
+ {
mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
}
}
@@ -461,7 +465,10 @@ BOOL LLFloaterTexturePicker::postBuild()
// don't put keyboard focus on selected item, because the selection callback
// will assume that this was user input
- mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+ if(!mImageAssetID.isNull())
+ {
+ mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+ }
}
mModeSelector = getChild<LLRadioGroup>("mode_selection");
@@ -820,7 +827,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
{
mNoCopyTextureSelected = TRUE;
}
- setImageID(itemp->getAssetUUID());
+ setImageID(itemp->getAssetUUID(),false);
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
if (user_action && mCanPreview)
{