aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewlandmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpreviewlandmark.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp
index f4637dd..62d103b 100644
--- a/linden/indra/newview/llpreviewlandmark.cpp
+++ b/linden/indra/newview/llpreviewlandmark.cpp
@@ -70,7 +70,8 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
70 const LLRect& rect, 70 const LLRect& rect,
71 const std::string& title, 71 const std::string& title,
72 const LLUUID& item_uuid, 72 const LLUUID& item_uuid,
73 BOOL show_keep_discard) 73 BOOL show_keep_discard,
74 LLViewerInventoryItem* inv_item)
74: LLPreview(name, 75: LLPreview(name,
75 LLRect(rect.mLeft, 76 LLRect(rect.mLeft,
76 rect.mTop, 77 rect.mTop,
@@ -78,7 +79,10 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
78 rect.mBottom), 79 rect.mBottom),
79 title, 80 title,
80 item_uuid, 81 item_uuid,
81 LLUUID::null), 82 LLUUID::null, // object id
83 FALSE, // allow resize
84 0, 0, // min dimensions
85 inv_item),
82 mLandmark( NULL ) 86 mLandmark( NULL )
83{ 87{
84 88
@@ -97,7 +101,7 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
97 childSetAction("Teleport btn", onTeleportBtn,this); 101 childSetAction("Teleport btn", onTeleportBtn,this);
98 childSetAction("Show on Map btn", onMapBtn,this); 102 childSetAction("Show on Map btn", onMapBtn,this);
99 103
100 LLInventoryItem* item = getItem(); 104 const LLInventoryItem* item = getItem();
101 105
102 childSetCommitCallback("desc", LLPreview::onText, this); 106 childSetCommitCallback("desc", LLPreview::onText, this);
103 childSetText("desc", item->getDescription()); 107 childSetText("desc", item->getDescription());
@@ -135,7 +139,7 @@ void LLPreviewLandmark::onTeleportBtn( void* userdata )
135 LLPreviewLandmark* self = (LLPreviewLandmark*) userdata; 139 LLPreviewLandmark* self = (LLPreviewLandmark*) userdata;
136 gFocusMgr.setKeyboardFocus(NULL, NULL); 140 gFocusMgr.setKeyboardFocus(NULL, NULL);
137 141
138 LLInventoryItem *item = self->getItem(); 142 const LLInventoryItem *item = self->getItem();
139 if(item) 143 if(item)
140 { 144 {
141 gAgent.teleportViaLandmark(item->getAssetUUID()); 145 gAgent.teleportViaLandmark(item->getAssetUUID());
@@ -181,7 +185,7 @@ void LLPreviewLandmark::getDegreesAndDist( F32* degrees, F64* horiz_dist, F64* v
181 185
182const LLString& LLPreviewLandmark::getName() const 186const LLString& LLPreviewLandmark::getName() const
183{ 187{
184 LLInventoryItem *item = getItem(); 188 const LLInventoryItem *item = getItem();
185 if (item) 189 if (item)
186 { 190 {
187 return item->getName(); 191 return item->getName();
@@ -210,7 +214,7 @@ void LLPreviewLandmark::draw()
210{ 214{
211 if( getVisible() ) 215 if( getVisible() )
212 { 216 {
213 LLInventoryItem *item = getItem(); 217 const LLInventoryItem *item = getItem();
214 218
215 if( item && !mLandmark ) 219 if( item && !mLandmark )
216 { 220 {
@@ -248,7 +252,7 @@ void LLPreviewLandmark::draw()
248 252
249void LLPreviewLandmark::loadAsset() 253void LLPreviewLandmark::loadAsset()
250{ 254{
251 LLInventoryItem *item = getItem(); 255 const LLInventoryItem *item = getItem();
252 256
253 if( item && !mLandmark ) 257 if( item && !mLandmark )
254 { 258 {
@@ -259,7 +263,7 @@ void LLPreviewLandmark::loadAsset()
259 263
260LLPreview::EAssetStatus LLPreviewLandmark::getAssetStatus() 264LLPreview::EAssetStatus LLPreviewLandmark::getAssetStatus()
261{ 265{
262 LLInventoryItem *item = getItem(); 266 const LLInventoryItem *item = getItem();
263 if (item && gLandmarkList.assetExists(item->getAssetUUID())) 267 if (item && gLandmarkList.assetExists(item->getAssetUUID()))
264 { 268 {
265 mAssetStatus = PREVIEW_ASSET_LOADED; 269 mAssetStatus = PREVIEW_ASSET_LOADED;