From 1788f26b4c8fc91836feba298fd0d38564411341 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 8 Mar 2010 16:17:47 +0800 Subject: EXT-2418 Object hover tips no longer show price, description or owner --- indra/newview/lltoolpie.cpp | 23 +++++++++++++++++------ indra/newview/skins/default/xui/en/strings.xml | 4 +++- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index fb78b6a415..94e43b1e0e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -931,7 +931,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l if (media_impl.notNull() && (media_impl->hasMedia())) { is_media_displaying = true; - LLStringUtil::format_map_t args; + //LLStringUtil::format_map_t args; media_plugin = media_impl->getMediaPlugin(); if(media_plugin) @@ -955,13 +955,24 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } - // Avoid showing tip over media that's displaying + // Add price to tooltip for items on sale + bool for_sale = for_sale_selection(nodep); + if(for_sale) + { + LLStringUtil::format_map_t args; + args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice()); + tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); + } + + // Avoid showing tip over media that's displaying unless it's for sale // also check the primary node since sometimes it can have an action even though // the root node doesn't - bool needs_tip = !is_media_displaying && - (has_media || - needs_tooltip(nodep) || - needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode())); + + bool needs_tip = (!is_media_displaying || + for_sale) && + (has_media || + needs_tooltip(nodep) || + needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode())); if (show_all_object_tips || needs_tip) { diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 59c54f0cad..56147cd72b 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -76,7 +76,9 @@ Click to view this object's description Click to view this location on a map Click to run the secondlife:// command - + + + Teleport to -- cgit v1.2.3 From 032762fecffb913fd6178965befec62d6b5171e7 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 9 Mar 2010 10:04:36 +0800 Subject: EXT-2418 add price to object tooltip --- indra/newview/lltoolpie.cpp | 20 +++++++++++--------- indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 94e43b1e0e..2f4a69a53c 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -901,6 +901,16 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l || !existing_inspector->getVisible() || existing_inspector->getKey()["object_id"].asUUID() != hover_object->getID())) { + + // Add price to tooltip for items on sale + bool for_sale = for_sale_selection(nodep); + if(for_sale) + { + LLStringUtil::format_map_t args; + args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice()); + tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); + } + if (nodep->mName.empty()) { tooltip_msg.append(LLTrans::getString("TooltipNoName")); @@ -954,15 +964,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } } - - // Add price to tooltip for items on sale - bool for_sale = for_sale_selection(nodep); - if(for_sale) - { - LLStringUtil::format_map_t args; - args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice()); - tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); - } + // Avoid showing tip over media that's displaying unless it's for sale // also check the primary node since sometimes it can have an action even though diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 56147cd72b..1eaf77c328 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -77,7 +77,7 @@ Click to view this location on a map Click to run the secondlife:// command - + -- cgit v1.2.3 From 5b7f8c719b4a5c0193fe4dd16ace94338c37f14d Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 10 Mar 2010 17:33:43 -0700 Subject: debug code for EXT-5599: Viewer crashes consistently, in Linden Homes region. --- indra/llimage/llimage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 5649b4cab7..7d0de18c7c 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -157,8 +157,9 @@ U8* LLImageBase::allocateData(S32 size) llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl; } } - else if (size <= 0 || (size > 4096*4096*16 && sSizeOverride == FALSE)) + if (size < 1 || (size > 4096*4096*16 && sSizeOverride == FALSE)) { + llinfos << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << llendl ; llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; } -- cgit v1.2.3 From fdfc59da9bd8767001fb1b137da0c3a354c87a92 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 10 Mar 2010 17:34:49 -0700 Subject: debug code for EXT-6093: crash at LLTextureCache::updateTextureEntryList [secondlife-bin lltexturecache.cpp:847] --- indra/newview/lltexturecache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 4649b9cbef..49770030c6 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1140,6 +1140,10 @@ void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry) { mTexturesSizeMap[entry.mID] = entry.mBodySize; } + else if(mTexturesSizeMap.find(entry.mID) != mTexturesSizeMap.end() && mTexturesSizeMap[entry.mID] > 0) + { + llerrs << "mTexturesSizeMap / mHeaderIDMap corrupted." << llendl ; + } // llinfos << "Updating TE: " << idx << ": " << id << " Size: " << entry.mBodySize << " Time: " << entry.mTime << llendl; mHeaderEntriesMaxWriteIdx = llmax(mHeaderEntriesMaxWriteIdx, idx); mUpdatedEntryMap[idx] = entry ; @@ -1450,6 +1454,10 @@ void LLTextureCache::purgeTextures(bool validate) time_idx_set.insert(std::make_pair(entries[idx].mTime, idx)); // llinfos << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << llendl; } + else + { + llerrs << "mTexturesSizeMap / mHeaderIDMap corrupted." << llendl ; + } } } -- cgit v1.2.3 From dc44d2dc1aec9661273abc7c2d78d290369c21cd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 10 Mar 2010 18:24:02 -0700 Subject: a try to fix EXT-5845: crash on LLTexLayerTemplate::render [secondlife-bin lltexlayer.cpp:1898] --- indra/newview/lltexlayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 6ed95f2cbf..386b636367 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1883,6 +1883,11 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) /*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height) { + if(!mInfo) + { + return FALSE ; + } + BOOL success = TRUE; updateWearableCache(); for (wearable_cache_t::const_iterator iter = mWearableCache.begin(); iter!= mWearableCache.end(); iter++) -- cgit v1.2.3