diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-11-15 17:58:32 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-11-15 17:58:32 +0200 |
commit | 4fcf31e20319fbbfdd76240b351753e5de726eb5 (patch) | |
tree | bb36a61a9edc96a65b057fdd60e566e183b66fa7 /indra | |
parent | 0afe586856765b9e3f8a39dd9b5b18bd0b02283d (diff) |
SL-12287 FIXED [Project Copy/Paste] Unable to paste texture from "local" storage
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lllocalbitmaps.cpp | 14 | ||||
-rw-r--r-- | indra/newview/lllocalbitmaps.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelface.cpp | 11 |
3 files changed, 25 insertions, 2 deletions
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index b8bde39bd1..5d301748c7 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -1038,6 +1038,20 @@ LLUUID LLLocalBitmapMgr::getWorldID(LLUUID tracking_id) return world_id; } +bool LLLocalBitmapMgr::isLocalBitmap(LLUUID texture_id) +{ + for (local_list_iter iter = mBitmapList.begin(); iter != mBitmapList.end(); iter++) + { + LLLocalBitmap* unit = *iter; + if (unit->getWorldID() == texture_id) + { + return true; + } + } + + return false; +} + std::string LLLocalBitmapMgr::getFilename(LLUUID tracking_id) { std::string filename = ""; diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index f6cc1e919e..c15ba9caa4 100644 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -122,6 +122,8 @@ public: LLUUID getWorldID(LLUUID tracking_id); std::string getFilename(LLUUID tracking_id); + bool isLocalBitmap(LLUUID texture_id); + void feedScrollList(LLScrollListCtrl* ctrl); void doUpdates(); void setNeedsRebake(); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index e19e3f13ee..da471b0b62 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2923,8 +2923,15 @@ void LLPanelFace::onCopyFaces() // Doesn't support local images! if (id.isNull() || !LLPanelObject::canCopyTexture(id)) { - te_data["te"].erase("imageid"); - te_data["te"]["imageid"] = LLUUID(gSavedSettings.getString( "DefaultObjectTexture" )); + if (LLLocalBitmapMgr::getInstance()->isLocalBitmap(id)) + { + te_data["te"]["imageid"] = id; + } + else + { + te_data["te"].erase("imageid"); + te_data["te"]["imageid"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture")); + } te_data["te"]["itemfullperm"] = true; } else |