aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewlandmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpreviewlandmark.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp
index af49aee..adb6db1 100644
--- a/linden/indra/newview/llpreviewlandmark.cpp
+++ b/linden/indra/newview/llpreviewlandmark.cpp
@@ -56,7 +56,7 @@
56#include "llviewercontrol.h" 56#include "llviewercontrol.h"
57#include "llviewerregion.h" 57#include "llviewerregion.h"
58#include "llviewerstats.h" 58#include "llviewerstats.h"
59#include "llvieweruictrlfactory.h" 59#include "lluictrlfactory.h"
60 60
61 61
62 62
@@ -89,7 +89,7 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
89{ 89{
90 90
91 mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this); 91 mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this);
92 gUICtrlFactory->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap()); 92 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap());
93 93
94 /* 94 /*
95 childSetCommitCallback("desc_editor", LLPreview::onText, this); 95 childSetCommitCallback("desc_editor", LLPreview::onText, this);
@@ -166,26 +166,23 @@ const LLColor4& LLPreviewLandmark::getMarkerColor() const
166 166
167void LLPreviewLandmark::draw() 167void LLPreviewLandmark::draw()
168{ 168{
169 if( getVisible() ) 169 const LLInventoryItem *item = getItem();
170 {
171 const LLInventoryItem *item = getItem();
172 170
173 if( item && !mLandmark ) 171 if( item && !mLandmark )
172 {
173 mLandmark = gLandmarkList.getAsset( item->getAssetUUID() );
174 if(mLandmark && mPlacePanel)
174 { 175 {
175 mLandmark = gLandmarkList.getAsset( item->getAssetUUID() ); 176 LLVector3 pos_region = mLandmark->getRegionPos(); // always have this
176 if(mLandmark && mPlacePanel) 177 LLUUID landmark_asset_id = item->getAssetUUID(); // always have this
177 { 178 LLUUID region_id;
178 LLVector3 pos_region = mLandmark->getRegionPos(); // always have this 179 mLandmark->getRegionID(region_id); // might find null?
179 LLUUID landmark_asset_id = item->getAssetUUID(); // always have this 180 LLVector3d pos_global = getPositionGlobal(); // might be 0
180 LLUUID region_id; 181 mPlacePanel->displayParcelInfo(pos_region, landmark_asset_id, region_id, pos_global);
181 mLandmark->getRegionID(region_id); // might find null?
182 LLVector3d pos_global = getPositionGlobal(); // might be 0
183 mPlacePanel->displayParcelInfo(pos_region, landmark_asset_id, region_id, pos_global);
184 }
185 } 182 }
186
187 LLPreview::draw();
188 } 183 }
184
185 LLPreview::draw();
189} 186}
190 187
191void LLPreviewLandmark::loadAsset() 188void LLPreviewLandmark::loadAsset()
@@ -213,7 +210,7 @@ void* LLPreviewLandmark::createPlaceDetail(void* userdata)
213{ 210{
214 LLPreviewLandmark *self = (LLPreviewLandmark*)userdata; 211 LLPreviewLandmark *self = (LLPreviewLandmark*)userdata;
215 self->mPlacePanel = new LLPanelPlace(); 212 self->mPlacePanel = new LLPanelPlace();
216 gUICtrlFactory->buildPanel(self->mPlacePanel, "panel_place.xml"); 213 LLUICtrlFactory::getInstance()->buildPanel(self->mPlacePanel, "panel_place.xml");
217 const LLInventoryItem* item = self->getItem(); 214 const LLInventoryItem* item = self->getItem();
218 self->mPlacePanel->displayItemInfo(item); 215 self->mPlacePanel->displayItemInfo(item);
219 216