From 673afb955b6f22244e7af100bcfbece6a688aef3 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 22 Jul 2014 11:36:27 +0300 Subject: MAINT-4253 FIXED Don't call setSelection() twice. --- indra/newview/lltexturectrl.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index b9eb68556d..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) { @@ -240,7 +240,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? mImageAssetID = image_id; LLUUID item_id = findItemID(mImageAssetID, FALSE); - if (image_id.isNull()) + if (item_id.isNull()) { mInventoryPanel->getRootFolder()->clearSelection(); } @@ -253,6 +253,10 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) getChild("apply_immediate_check")->setValue(FALSE); mNoCopyTextureSelected = TRUE; } + } + + if (set_selection) + { mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO); } } @@ -823,7 +827,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::dequegetAssetUUID()); + setImageID(itemp->getAssetUUID(),false); mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? if (user_action && mCanPreview) { -- cgit v1.2.3