diff options
| author | Steve Bennetts <steve@lindenlab.com> | 2009-10-26 16:03:34 -0700 | 
|---|---|---|
| committer | Steve Bennetts <steve@lindenlab.com> | 2009-10-26 16:03:34 -0700 | 
| commit | 7f3af8bc388e99d3ca9ce3f685346e1db07af20f (patch) | |
| tree | 86048fb1e03e61784326cf1bf5564db4a1937d76 | |
| parent | 3e9a8c1f43c2d9656815a3f6d4559ef10bd179e7 (diff) | |
| parent | b078c44c9f876d25ba0454460902e0b4b65221c3 (diff) | |
merge
| -rw-r--r-- | indra/newview/lllandmarklist.cpp | 36 | ||||
| -rw-r--r-- | indra/newview/lllandmarklist.h | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 2 | 
4 files changed, 32 insertions, 15 deletions
| diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 2e8084759a..83e694951b 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -37,6 +37,7 @@  #include "message.h"  #include "llassetstorage.h" +#include "llappviewer.h"  #include "llagent.h"  #include "llnotify.h"  #include "llvfile.h" @@ -63,20 +64,32 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t  	}  	else  	{ -	    if ( gLandmarkList.mBadList.find(asset_uuid) == gLandmarkList.mBadList.end() ) +	    if ( mBadList.find(asset_uuid) != mBadList.end() )  		{ -			if (cb) +			return NULL; +		} +		 +		landmark_requested_list_t::iterator iter = mRequestedList.find(asset_uuid); +		if (iter != mRequestedList.end()) +		{ +			const F32 rerequest_time = 30.f; // 30 seconds between requests +			if (gFrameTimeSeconds - iter->second < rerequest_time)  			{ -				loaded_callback_map_t::value_type vt(asset_uuid, cb); -				mLoadedCallbackMap.insert(vt); +				return NULL;  			} - -			gAssetStorage->getAssetData( -				asset_uuid, -				LLAssetType::AT_LANDMARK, -				LLLandmarkList::processGetAssetReply, -				NULL);  		} +		 +		if (cb) +		{ +			loaded_callback_map_t::value_type vt(asset_uuid, cb); +			mLoadedCallbackMap.insert(vt); +		} + +		gAssetStorage->getAssetData(asset_uuid, +									LLAssetType::AT_LANDMARK, +									LLLandmarkList::processGetAssetReply, +									NULL); +		mRequestedList[asset_uuid] = gFrameTimeSeconds;  	}  	return NULL;  } @@ -103,7 +116,8 @@ void LLLandmarkList::processGetAssetReply(  		if (landmark)  		{  			gLandmarkList.mList[ uuid ] = landmark; - +			gLandmarkList.mRequestedList.erase(uuid); +			  			LLVector3d pos;  			if(!landmark->getGlobalPos(pos))  			{ diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index ebf1b65e97..d9c3267142 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -74,7 +74,10 @@ protected:  	typedef std::set<LLUUID> landmark_bad_list_t;  	landmark_bad_list_t mBadList; - +	 +	typedef std::map<LLUUID,F32> landmark_requested_list_t; +	landmark_requested_list_t mRequestedList; +	  	// *TODO: make the callback multimap a template class and make use of it  	// here and in LLLandmark.  	typedef std::multimap<LLUUID, loaded_callback_t> loaded_callback_map_t; diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 8cdcee6927..29fe046ed3 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2836,8 +2836,8 @@          <button           follows="left|top"           height="20" -         label="Land profile" -         label_selected="Land profile" +         label="About Land" +         label_selected="About Land"           layout="topleft"           left_delta="0"           name="button about land" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 34d0498180..e98492feda 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -232,7 +232,7 @@          <menu_item_separator           layout="topleft" />          <menu_item_call -         label="Place Profile" +         label="About Land"           layout="topleft"           name="About Land">              <menu_item_call.on_click | 
