diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-03-16 12:33:25 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-03-16 12:33:25 -0700 |
commit | 60c4621500e478d66a8bdc3a1c80573be2860fee (patch) | |
tree | fa10b52caf3a54e03502058cd52d77952370cb34 /indra/newview/lltoolpie.cpp | |
parent | 2e525711cd08d5f1dce991d1b6595a8dd41c9e3b (diff) | |
parent | ba414d500ca8cb88da530c89ba373c95195ce633 (diff) |
Automated merge from viewer/viewer-2-0
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r-- | indra/newview/lltoolpie.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index fb78b6a415..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")); @@ -931,7 +941,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) @@ -954,14 +964,17 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } } - - // Avoid showing tip over media that's displaying + + + // 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) { |