diff options
author | Oz Linden <oz@lindenlab.com> | 2015-01-13 13:46:45 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-01-13 13:46:45 -0500 |
commit | 6f3cf79a3afa66db229a1c1068e0c01f246f0b79 (patch) | |
tree | 5eb6e710adc6a0c770f681fabb44fd385dbef977 /indra/newview/lltexturectrl.cpp | |
parent | ccd10beb6f8523c401b08d57e916c85d756eb27e (diff) | |
parent | fad02b30ce61a38007c5cd450cbdd2e09464888d (diff) |
merge changes for 3.7.24-release
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rwxr-xr-x | indra/newview/lltexturectrl.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index eebed63ef2..3e5b91c8fc 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -112,7 +112,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); @@ -226,7 +226,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) { @@ -247,6 +247,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); } } @@ -455,7 +459,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"); @@ -814,7 +821,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) { |