diff options
| author | Rick Pasetto <rick@lindenlab.com> | 2010-01-29 14:30:43 -0800 | 
|---|---|---|
| committer | Rick Pasetto <rick@lindenlab.com> | 2010-01-29 14:30:43 -0800 | 
| commit | 5a478a14ea37e48830e41ef4a93ec846f84d4a94 (patch) | |
| tree | b8d42b1d8547e4c0cebe9cc0b1533b195aa6f565 /indra | |
| parent | 97e59b20f0a7bed7119496c0848ccefa79cac5e1 (diff) | |
| parent | 7cdfed8291e71d2481e41c79de2a98978cdc0858 (diff) | |
Automated merge with ssh://rick@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/lltoolpie.cpp | 40 | 
1 files changed, 24 insertions, 16 deletions
| diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 39e71974fd..bf1e307d71 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -910,16 +910,19 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l  				tooltip_msg.append( nodep->mName );  			} +			bool has_media = false;  			bool is_time_based_media = false;  			bool is_web_based_media = false;  			bool is_media_playing = false; +			bool is_media_displaying = false;  			// Does this face have media?  			const LLTextureEntry* tep = hover_object->getTE(mHoverPick.mObjectFace);  			if(tep)  			{ -				const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; +				has_media = tep->hasMedia(); +				const LLMediaEntry* mep = has_media ? tep->getMediaData() : NULL;  				if (mep)  				{  					viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); @@ -927,33 +930,38 @@ 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;  						media_plugin = media_impl->getMediaPlugin();  						if(media_plugin) -						{	if(media_plugin->pluginSupportsMediaTime()) -						{ -							is_time_based_media = true; -							is_web_based_media = false; -							//args["[CurrentURL]"] =  media_impl->getMediaURL(); -							is_media_playing = media_impl->isMediaPlaying(); -						} -						else -						{ -							is_time_based_media = false; -							is_web_based_media = true; -							//args["[CurrentURL]"] =  media_plugin->getLocation(); -						} +						{	 +							if(media_plugin->pluginSupportsMediaTime()) +							{ +								is_time_based_media = true; +								is_web_based_media = false; +								//args["[CurrentURL]"] =  media_impl->getMediaURL(); +								is_media_playing = media_impl->isMediaPlaying(); +							} +							else +							{ +								is_time_based_media = false; +								is_web_based_media = true; +								//args["[CurrentURL]"] =  media_plugin->getLocation(); +							}  							//tooltip_msg.append(LLTrans::getString("CurrentURL", args));  						}  					}  				}  			} +			// Avoid showing tip over media that's displaying  			// also check the primary node since sometimes it can have an action even though  			// the root node doesn't -			bool needs_tip = needs_tooltip(nodep) ||  -			needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()); +			bool needs_tip = !is_media_displaying && +				(has_media ||  +				 needs_tooltip(nodep) ||  +				 needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()));  			if (show_all_object_tips || needs_tip)  			{ | 
